-
-
Notifications
You must be signed in to change notification settings - Fork 784
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 Xlinker rpath linker flags deduplication #5778
Conversation
34590d5
to
a64735d
Compare
you can provide an example, i will test it. |
a64735d
to
d941c63
Compare
unique[flagkey] = true | ||
if flagkey:startswith("-l") or flagkey:startswith("-L") or flagkey:startswith("/l") or flagkey:startswith("/L") then | ||
unique[flagkey] = true | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to deduplicate more flags, e.g. -Dxx ...
So we shouldn't do this, hard coding is not universal.
if use table group, this flag will be not deduplicated, xmake/xmake/core/tool/builder.lua Line 734 in 1c689fd
|
Okay so with an xmake.lua like add_requires("glm", {configs = {modules = true}})
target("foo")
set_languages("c++23")
add_files("src/**.cpp")
set_policy("build.c++.modules", true)
add_packages("glm") and src/main.cpp import glm;
int main() {
auto foo = glm::vec2{};
} i get this output on macOS with brew llvm
-Xlinker flags from check_cxsnippet is getting deduplicated
should be
|
i tried that before, but it broke other things, the xmake f work but
|
try this patch. #5782 |
got this errors when trying to compile glm package on macOS with modules enabled and homebrew llvm