[cfe-dev] Can't use -Wa,--noexecstack with -fembed-bitcode

Ian Spence via cfe-dev cfe-dev at lists.llvm.org
Sat Jul 7 17:05:10 PDT 2018


I'm trying to compile OpenSSL 1.1.1-pre8 for iOS (arm64). This
questions may be better suited for the OpenSSL team, however the
specific problem I'm having is with Clang. I would like to enable
bitcode when compiling OpenSSL so my app can also benifit from the
reduced binary size, however I can't seem to figure out how to enable
bitcode as there's a conflicting argument that OpenSSL provides

The specific error I'm seeing is: "clang: error: -Wa, is not supported
with -fembed-bitcode"

The full command is (from output of "make -j4")

 -I. -Iinclude -fPIC -arch armv7 -mios-version-min=6.0.0 -fno-common
-Wa,--noexecstack -Qunused-arguments -arch armv7s -pipe -Os -gdwarf-2
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk
-miphoneos-version-min=9.3 -fembed-bitcode -DOPENSSL_PIC
-DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG
-MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o

As I'm building a shared library I don't want to remove the
"-Wa,--noexecstack" option, but I can't seem to find another way to
tell Clang to embed bitcode. What am I missing here?


- Ian

More information about the cfe-dev mailing list