diff options
| author | ruki <[email protected]> | 2024-11-26 12:06:37 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-26 12:06:37 +0800 |
| commit | c08b0169920e7a5aff7538ffafa5874ad1f2fe3c (patch) | |
| tree | 62b9c0f174e03279c5c59c68cbd8e77d8f4c3c89 /xmake/rules/c++/modules/modules_support | |
| parent | 565b8ed7a2043ad4988df0a090fac2d71f6e6453 (diff) | |
Update compiler_support.lua
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/gcc/compiler_support.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xmake/rules/c++/modules/modules_support/gcc/compiler_support.lua b/xmake/rules/c++/modules/modules_support/gcc/compiler_support.lua index 978acc3de..f23beb20a 100644 --- a/xmake/rules/c++/modules/modules_support/gcc/compiler_support.lua +++ b/xmake/rules/c++/modules/modules_support/gcc/compiler_support.lua @@ -137,7 +137,6 @@ end function _get_std_module_manifest_path(target) local compinst = target:compiler("cxx") - local modules_json_path, _ = try { function() return os.iorunv(compinst:program(), {"-print-file-name=libstdc++.modules.json"}, {envs = compinst:runenvs()}) @@ -154,8 +153,7 @@ function _get_std_module_manifest_path(target) -- fallback on custom detection -- manifest can be found alongside libstdc++.so - -- @TODO - + -- TODO end function get_stdmodules(target) @@ -193,7 +191,7 @@ function get_modulesflag(target) local compinst = target:compiler("cxx") local gcc_version = get_gcc_version(target) -- GCC 12 and earlier version has a option '-fmodules' for Modula-2 - if semver.compare(gcc_version, "12") > 0 then + if gcc_version and semver.compare(gcc_version, "12") > 0 then if compinst:has_flags("-fmodules", "cxxflags", {flagskey = "gcc_modules"}) then modulesflag = "-fmodules" elseif compinst:has_flags("-fmodules-ts", "cxxflags", {flagskey = "gcc_modules_ts"}) then |
