diff --git a/test/Reflection/conformance_descriptors.swift b/test/Reflection/conformance_descriptors.swift index 4d08d5bb21328..b114f76455280 100644 --- a/test/Reflection/conformance_descriptors.swift +++ b/test/Reflection/conformance_descriptors.swift @@ -11,7 +11,7 @@ // RUN: %empty-directory(%t) -// RUN: %target-build-swift -target %target-swift-5.2-abi-triple %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift %S/Inputs/Conformances.swift -parse-as-library -emit-module -emit-library -module-name ConformanceCheck -o %t/Conformances +// RUN: %target-build-swift -target %target-swift-5.2-abi-triple %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift %S/Inputs/Conformances.swift -parse-as-library -emit-module -emit-library %no-fixup-chains -module-name ConformanceCheck -o %t/Conformances // RUN: %target-swift-reflection-dump %t/Conformances %platform-module-dir/%target-library-name(swiftCore) | %FileCheck %s // CHECK: CONFORMANCES: diff --git a/test/Reflection/typeref_decoding.swift b/test/Reflection/typeref_decoding.swift index ea8c9db8bf3aa..e0a3b4465a39e 100644 --- a/test/Reflection/typeref_decoding.swift +++ b/test/Reflection/typeref_decoding.swift @@ -11,8 +11,8 @@ // FIXME: rdar://127796117 // UNSUPPORTED: OS=linux-gnu && CPU=aarch64 -// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -enable-anonymous-context-mangled-names %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift -parse-as-library -emit-module -emit-library -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect) -// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -enable-anonymous-context-mangled-names %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift %S/Inputs/main.swift -emit-module -emit-executable -module-name TypesToReflect -o %t/TypesToReflect +// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -enable-anonymous-context-mangled-names %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift -parse-as-library -emit-module -emit-library %no-fixup-chains -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect) +// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -enable-anonymous-context-mangled-names %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift %S/Inputs/main.swift -emit-module -emit-executable %no-fixup-chains -module-name TypesToReflect -o %t/TypesToReflect // RUN: %target-swift-reflection-dump %t/%target-library-name(TypesToReflect) | %FileCheck %s // RUN: %target-swift-reflection-dump %t/TypesToReflect | %FileCheck %s diff --git a/test/Reflection/typeref_decoding_imported.swift b/test/Reflection/typeref_decoding_imported.swift index efd27436204c8..82efcf7b9b1ab 100644 --- a/test/Reflection/typeref_decoding_imported.swift +++ b/test/Reflection/typeref_decoding_imported.swift @@ -11,14 +11,14 @@ // RUN: %empty-directory(%t) -// RUN: %target-build-swift -target %target-swift-5.2-abi-triple %S/Inputs/ImportedTypes.swift %S/Inputs/ImportedTypesOther.swift -parse-as-library -emit-module -emit-library -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect) -I %S/Inputs +// RUN: %target-build-swift -target %target-swift-5.2-abi-triple %S/Inputs/ImportedTypes.swift %S/Inputs/ImportedTypesOther.swift -parse-as-library -emit-module -emit-library %no-fixup-chains -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect) -I %S/Inputs // RUN: %target-swift-reflection-dump %t/%target-library-name(TypesToReflect) | %FileCheck %s --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-cpu // ... now, test single-frontend mode with multi-threaded LLVM emission: // RUN: %empty-directory(%t) -// RUN: %target-build-swift -target %target-swift-5.2-abi-triple %S/Inputs/ImportedTypes.swift %S/Inputs/ImportedTypesOther.swift -parse-as-library -emit-module -emit-library -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect) -I %S/Inputs -whole-module-optimization -num-threads 2 +// RUN: %target-build-swift -target %target-swift-5.2-abi-triple %S/Inputs/ImportedTypes.swift %S/Inputs/ImportedTypesOther.swift -parse-as-library -emit-module -emit-library %no-fixup-chains -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect) -I %S/Inputs -whole-module-optimization -num-threads 2 // RUN: %target-swift-reflection-dump %t/%target-library-name(TypesToReflect) | %FileCheck %s --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-cpu // UNSUPPORTED: OS=linux-android, OS=linux-androideabi diff --git a/test/Reflection/typeref_lowering.swift b/test/Reflection/typeref_lowering.swift index 777546ab5f7e3..21abe3315db07 100644 --- a/test/Reflection/typeref_lowering.swift +++ b/test/Reflection/typeref_lowering.swift @@ -9,8 +9,8 @@ // rdar://100558042 // UNSUPPORTED: CPU=arm64e -// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -disable-availability-checking %S/Inputs/TypeLowering.swift -parse-as-library -emit-module -emit-library -module-name TypeLowering -o %t/%target-library-name(TypesToReflect) -// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -disable-availability-checking %S/Inputs/TypeLowering.swift %S/Inputs/main.swift -emit-module -emit-executable -module-name TypeLowering -o %t/TypesToReflect +// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -disable-availability-checking %S/Inputs/TypeLowering.swift -parse-as-library -emit-module -emit-library %no-fixup-chains -module-name TypeLowering -o %t/%target-library-name(TypesToReflect) +// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -disable-availability-checking %S/Inputs/TypeLowering.swift %S/Inputs/main.swift -emit-module -emit-executable %no-fixup-chains -module-name TypeLowering -o %t/TypesToReflect // RUN: %target-swift-reflection-dump %t/%target-library-name(TypesToReflect) %platform-module-dir/%target-library-name(swiftCore) -dump-type-lowering < %s | %FileCheck %s --check-prefix=CHECK-%target-ptrsize // RUN: %target-swift-reflection-dump %t/TypesToReflect %platform-module-dir/%target-library-name(swiftCore) -dump-type-lowering < %s | %FileCheck %s --check-prefix=CHECK-%target-ptrsize diff --git a/test/lit.cfg b/test/lit.cfg index bdef096e5ac87..9e1b705b80fea 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -2828,6 +2828,13 @@ if config.sanitizers: else: config.substitutions.append(('%target-sanitizer-opt', '')) +# Option to disable chained fixups on Darwin targets. +if platform.system() == 'Darwin': + config.substitutions.append(('%no-fixup-chains', + '-Xlinker -no_fixup_chains')) +else: + config.substitutions.append(('%no-fixup-chains', '')) + # WORKAROUND(rdar://53507844): On some macOS versions, we see flaky failures in # tests which create a hard link to an executable and immediately invoke it. # Work around this by always copying on Darwin.