microsoft / spoor

Compiler-instrumented app tracing.
https://www.spoor.dev
Other
52 stars 6 forks source link

Do not embed bitcode in instrumented builds #266

Closed lelandjansen closed 2 years ago

lelandjansen commented 2 years ago

rules_apple's apple_xcframework rule does not support embedding bitcode (yet). Therefore, Spoor's runtime library will fail to link. This PR works around this limitation by stripping the -fembed-bitcode and fembed-bitcode-marker linker flags.

This is an acceptable hack because bitcode embedding is used when uploading a bundle to the App Store so Apple can recompile the app internally. Since apps cannot be uploaded to the App Store when build with a custom toolchain (such as Spoor), bitcode embedding is not useful (for most cases).

Introduces #265.