I'm trying to build LLVM bitcode files from standard lib but can't figure out the right combination of params for build-script.
--embed-bitcode-section=1 but getting the following errors:
- Without LTO:
ld: loaded libLTO doesn't support -bitcode_hide_symbols: LLVM version 5.0.0 for architecture arm64
- With thin LTO or with full LTO:
ld: could not process llvm bitcode object file, because swift-source/build/thinlto/llvm-iphoneos-arm64/./lib/libLTO.dylib could not be loaded file 'lib/SwiftDemangle/CMakeFiles/swiftDemangle.dir/SwiftDemangle.cpp.o' for architecture arm64
The full commands and build logs are here if they can help.
As for the 'what are you trying to achieve' question, I'm trying to get some simple swift scripts (no SDK calls, Obj-C or C) compiled to LLVM bitcode without external references. I figure if I can
llvm-link the bitcode output of swiftc with bitcode of stdlib and foundation I'll be off to a good start.
Appreciate any tips on building myself, or a way to extract from distributed toolchains if that's possible.