Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

clang: error: unknown argument: '-no_adhoc_codesign'

I’m trying to get rid of linker-signed out of my xxx.dylib. So according to this, I added -no_adhoc_codesign to linker flag with -DCMAKE_SHARED_LINKER_FLAGS="-no_adhoc_codesign" but it seems clang has no idea about this flag. ld does have this option

clang: error: unknown argument: '-no_adhoc_codesign'

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can use -Wl,-no_adhoc_codesign to pass the option directly to the linker if the compiler doesn’t support adding the option itself.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading