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
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -fuse-ld=ld -stdlib=libc++ .... -dynamiclib -Wl,-headerpad_max_install_names -no_adhoc_codesign -o output/xxx.dylib
It's from Clion run-Wl,-no_adhoc_codesign
to pass the option directly to the linker