Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gcc modules #5887

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ function load(target)
-- @see https://github.com/xmake-io/xmake/issues/2716#issuecomment-1225057760
-- https://github.com/xmake-io/xmake/issues/3855

-- libstdc++ std modules cannot compile with -D_GLIBCXX_USE_CXX11_ABI=0
if target:policy("build.c++.modules.std") or target:policy("build.c++.gcc.modules.cxx11abi") then
if target:policy("build.c++.gcc.modules.cxx11abi") then
target:add("cxxflags", "-D_GLIBCXX_USE_CXX11_ABI=1")
else
target:add("cxxflags", "-D_GLIBCXX_USE_CXX11_ABI=0")
Expand Down Expand Up @@ -158,12 +157,12 @@ end

function get_stdmodules(target)
if not target:policy("build.c++.modules.std") then
return nil
return
end

local modules_json_path = _get_std_module_manifest_path(target)
if not modules_json_path then
return nil
return
end

local modules_json = json.loadfile(modules_json_path)
Expand Down
Loading