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

won't work with llvm-ar #50

Open
ebenali opened this issue Feb 13, 2024 · 2 comments
Open

won't work with llvm-ar #50

ebenali opened this issue Feb 13, 2024 · 2 comments

Comments

@ebenali
Copy link

ebenali commented Feb 13, 2024

-DCMAKE_AR=llvm-ar -DCMAKE_C_FLAGS="-flto=thin" -DCMAKE_...=... ...

[  2%] Linking C static library libcmake_git_version_tracking.a                                                                         
/usr/bin/ar: invalid option -- 'e'                                                                                                      
Usage: /usr/bin/ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...   
       /usr/bin/ar -M [<mri-script]                                                                                                     
.
.
@andrew-hardin
Copy link
Owner

I'd like to reproduce this failure - could you please provide just a bit more information?

@ebenali
Copy link
Author

ebenali commented Mar 8, 2024

this was an attempt to override all the CMAKE_* variables and use the llvm- prefixed parts without having to mess with linux's "Alternatives"

The dependent project has LANGUAGES set to CXX so maybe I neglected to set C-specific cmake vars for referencing the 'ar' binary during some stage in the configure/build.

--- Specifically i was using these

{
                "CMAKE_AR": "llvm-ar",
                "CMAKE_NM": "llvm-nm",
                "CMAKE_OBJCOPY": "llvm-objcopy",
                "CMAKE_OBJDUMP": "llvm-objdump",
                "CMAKE_RANLIB": "llvm-ranlib",
                "CMAKE_READELF": "llvm-readelf",
                "CMAKE_STRIP": "llvm-strip",
                "CMAKE_DLLTOOL": "llvm-dlltool",
                "CMAKE_C_COMPILER": "clang",
                "CMAKE_CXX_COMPILER": "clang++",
                "CMAKE_CXX_FLAGS": "-stdlib=libc++ -fuse-ld=lld --rtlib=compiler-rt -flto=thin",
                "CMAKE_C_FLAGS": "-fuse-ld=lld --rtlib=compiler-rt -flto=thin",
                "CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=lld -flto=thin --rtlib=compiler-rt",
                "CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=lld -flto=thin --rtlib=compiler-rt",
                "CMAKE_STATIC_LINKER_FLAGS": "-fuse-ld=lld -flto=thin --rtlib=compiler-rt"
}

If you are unable to reproduce this issue feel free to just close, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants