Native: fix Swift compilation in tests for tvos_simulator_arm64
e5ae32c removed bitcode embedding from tests. In particular, that commit
disabled bitcode embedding when compiling Swift code (e.g. in ObjCExport
tests).
It seems that bitcode embedding also enables adhoc codesigning in the
linker.
The linker doesn't seem to do adhoc codesigning by default for tvOS
arm64 simulator target, and without a signature the binaries can't run
on the simulator.
So disabling bitcode embedding also disabled adhoc codesigning and made
the tests fail on that target.
Fix this by explicitly passing `-Xlinker -adhoc_codesign` when compiling
Swift code in tests.
This commit is contained in:
committed by
Space Team
parent
c9f4a1a841
commit
dd55ca6ed0
@@ -297,7 +297,8 @@ fun compileSwift(
|
||||
val swiftTarget = configs.targetTriple.withOSVersion(configs.osVersionMin).toString()
|
||||
|
||||
val args = listOf("-sdk", configs.absoluteTargetSysRoot, "-target", swiftTarget) +
|
||||
options + "-o" + output.toString() + sources
|
||||
options + "-o" + output.toString() + sources +
|
||||
listOf("-Xlinker", "-adhoc_codesign") // Linker doesn't do adhoc codesigning for tvOS arm64 simulator by default.
|
||||
|
||||
val (stdOut, stdErr, exitCode) = runProcess(
|
||||
executor = localExecutor(project), executable = compiler, args = args,
|
||||
|
||||
Reference in New Issue
Block a user