diff --git a/include/swift/AST/DiagnosticsFrontend.def b/include/swift/AST/DiagnosticsFrontend.def index 903c73bc5bed2..4bbe64522eb25 100644 --- a/include/swift/AST/DiagnosticsFrontend.def +++ b/include/swift/AST/DiagnosticsFrontend.def @@ -24,6 +24,13 @@ WARNING(warning_no_such_sdk,none, "no such SDK: '%0'", (StringRef)) +WARNING(warning_no_resource_dir_in_sdk, none, + " You passed in an external -sdk without a Swift runtime.\n" + " Either specify a directory containing the runtime libraries with\n" + " the -resource-dir flag, or use -sysroot instead to point at a C/C++\n" + " sysroot alone. Falling back to this path for the Swift runtime modules\n" + " and libraries:\n" + " %0", (StringRef)) ERROR(error_no_frontend_args, none, "no arguments provided to '-frontend'", ()) diff --git a/lib/ClangImporter/ClangImporter.cpp b/lib/ClangImporter/ClangImporter.cpp index f3f6a446cd3e2..2dfca64d4100e 100644 --- a/lib/ClangImporter/ClangImporter.cpp +++ b/lib/ClangImporter/ClangImporter.cpp @@ -770,8 +770,8 @@ void importer::getNormalInvocationArguments( invocationArgStrs.push_back("-fapinotes-swift-version=" + languageVersion.asAPINotesVersionString()); - // Prefer `-sdk` paths. - if (!searchPathOpts.getSDKPath().empty()) { + // Prefer `-sdk` paths for Darwin. + if (triple.isOSDarwin() && !searchPathOpts.getSDKPath().empty()) { llvm::SmallString<261> path{searchPathOpts.getSDKPath()}; llvm::sys::path::append(path, "usr", "lib", "swift", "apinotes"); diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index f07a6659ebae2..c73f2ea8f5883 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -2280,6 +2280,7 @@ static bool validateSwiftModuleFileArgumentAndAdd(const std::string &swiftModule static bool ParseSearchPathArgs(SearchPathOptions &Opts, ArgList &Args, DiagnosticEngine &Diags, + const llvm::Triple &Triple, const CASOptions &CASOpts, const FrontendOptions &FrontendOpts, StringRef workingDirectory) { @@ -2414,6 +2415,18 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, ArgList &Args, if (const Arg *A = Args.getLastArg(OPT_resource_dir)) Opts.RuntimeResourcePath = A->getValue(); + else if (!Triple.isOSDarwin() && Args.hasArg(OPT_sdk)) { + llvm::SmallString<128> SDKResourcePath(Opts.getSDKPath()); + llvm::sys::path::append( + SDKResourcePath, "usr", "lib", + FrontendOpts.UseSharedResourceFolder ? "swift" : "swift_static"); + // Check for eg /usr/lib/swift/ + if (llvm::sys::fs::exists(SDKResourcePath)) + Opts.RuntimeResourcePath = SDKResourcePath.str(); + else + Diags.diagnose(SourceLoc(), diag::warning_no_resource_dir_in_sdk, + Opts.RuntimeResourcePath); + } Opts.SkipAllImplicitImportPaths |= Args.hasArg(OPT_nostdimport); Opts.SkipSDKImportPaths |= Args.hasArg(OPT_nostdlibimport); @@ -4073,7 +4086,7 @@ bool CompilerInvocation::parseArgs( ParseSymbolGraphArgs(SymbolGraphOpts, ParsedArgs, Diags, LangOpts); - if (ParseSearchPathArgs(SearchPathOpts, ParsedArgs, Diags, + if (ParseSearchPathArgs(SearchPathOpts, ParsedArgs, Diags, LangOpts.Target, CASOpts, FrontendOpts, workingDirectory)) { return true; } diff --git a/test/Inputs/clang-importer-sdk/usr/lib/swift/apinotes/cfuncs.apinotes b/test/ClangImporter/Inputs/cfuncs.apinotes similarity index 100% rename from test/Inputs/clang-importer-sdk/usr/lib/swift/apinotes/cfuncs.apinotes rename to test/ClangImporter/Inputs/cfuncs.apinotes diff --git a/test/ClangImporter/sdk-apinotes.swift b/test/ClangImporter/sdk-apinotes.swift index 8e53a0564569b..5c47d7781946c 100644 --- a/test/ClangImporter/sdk-apinotes.swift +++ b/test/ClangImporter/sdk-apinotes.swift @@ -1,4 +1,10 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify +// RUN: %empty-directory(%t/sdk/usr/lib/swift/apinotes) +// RUN: %empty-directory(%t/sdk/usr/lib/swift/%target-sdk-name) +// RUN: cp -r %clang-importer-sdk-path/usr/include %t/sdk/usr +// RUN: cp -r %test-resource-dir/shims %t/sdk/usr/lib/swift +// RUN: cp %S/Inputs/cfuncs.apinotes %t/sdk/usr/lib/swift/apinotes +// RUN: cp -r %platform-module-dir/Swift.swiftmodule %t/sdk/usr/lib/swift/%target-sdk-name/ +// RUN: %target-swift-frontend(mock-sdk: -sdk %t/sdk) -typecheck %s -verify -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import import cfuncs diff --git a/test/Serialization/module_defining_interface.swift b/test/Serialization/module_defining_interface.swift index fee71bb39c61f..69aaa009857fd 100644 --- a/test/Serialization/module_defining_interface.swift +++ b/test/Serialization/module_defining_interface.swift @@ -1,8 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/inputs) // RUN: %empty-directory(%t/test-sdk) -// RUN: %empty-directory(%t/test-sdk/usr/lib/swift) -// RUN: cp -r %platform-module-dir/Swift.swiftmodule %t/test-sdk/usr/lib/swift/Swift.swiftmodule +// RUN: %empty-directory(%t/test-sdk/usr/lib/swift/%target-sdk-name) +// RUN: cp -r %test-resource-dir/shims %t/test-sdk/usr/lib/swift +// RUN: cp -r %platform-module-dir/Swift{,OnoneSupport}.swiftmodule %t/test-sdk/usr/lib/swift/%target-sdk-name/ // RUN: %empty-directory(%t/test-sdk/usr/lib/Foo.swiftmodule) // RUN: split-file %s %t diff --git a/test/Serialization/module_defining_interface_client.swift b/test/Serialization/module_defining_interface_client.swift index 6f075677be096..aa5abda30b377 100644 --- a/test/Serialization/module_defining_interface_client.swift +++ b/test/Serialization/module_defining_interface_client.swift @@ -1,12 +1,13 @@ // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/inputs) // RUN: %empty-directory(%t/test-sdk) -// RUN: %empty-directory(%t/test-sdk/usr/lib/swift) +// RUN: %empty-directory(%t/test-sdk/usr/lib/swift/%target-sdk-name) // RUN: %empty-directory(%t/test-sdk/usr/lib/Foo.swiftmodule) // RUN: %empty-directory(%t/test-sdk/usr/lib/Bar.swiftmodule) // RUN: %empty-directory(%t/test-sdk/usr/lib/_Foo_Bar.swiftmodule) // RUN: %empty-directory(%t/test-sdk/usr/lib/Foo.swiftcrossimport) -// RUN: cp -r %platform-module-dir/Swift.swiftmodule %t/test-sdk/usr/lib/swift/Swift.swiftmodule +// RUN: cp -r %test-resource-dir/shims %t/test-sdk/usr/lib/swift +// RUN: cp -r %platform-module-dir/Swift{,OnoneSupport}.swiftmodule %t/test-sdk/usr/lib/swift/%target-sdk-name/ // RUN: split-file %s %t diff --git a/test/embedded/builtin-float.swift b/test/embedded/builtin-float.swift index 0e1cbc5526f00..0aad98a3bd6db 100644 --- a/test/embedded/builtin-float.swift +++ b/test/embedded/builtin-float.swift @@ -2,7 +2,7 @@ // RUN: mkdir -p %t/include // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: %target-swift-frontend -target armv7em-none-none-eabi -emit-ir %t/Main.swift -enable-experimental-feature Embedded -module-cache-path %t/ModuleCache -Xcc -I%t/include +// RUN: %swift_frontend_plain -target armv7em-none-none-eabi -emit-ir %t/Main.swift -enable-experimental-feature Embedded -module-cache-path %t/ModuleCache -Xcc -I%t/include // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler diff --git a/test/embedded/float-abi-hard.swift b/test/embedded/float-abi-hard.swift index f410efd604984..f309506e0e59a 100644 --- a/test/embedded/float-abi-hard.swift +++ b/test/embedded/float-abi-hard.swift @@ -1,7 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: %target-swift-emit-ir %t/Main.swift -import-bridging-header %t/BridgingHeader.h -parse-as-library -enable-experimental-feature Embedded -wmo \ +// RUN: %swift_frontend_plain -emit-ir %t/Main.swift -import-bridging-header %t/BridgingHeader.h -parse-as-library -enable-experimental-feature Embedded -wmo \ // RUN: -target armv7em-none-none-eabi -Xcc -mthumb -Xcc -mcpu=cortex-m7 -Xcc -mfloat-abi=hard -Xcc -mfpu=fpv5-sp-d16 -Xcc -D__FPU_USED=1 -Xcc -falign-functions=16 // UNSUPPORTED: CPU=wasm32 diff --git a/test/embedded/fragile-reference.swift b/test/embedded/fragile-reference.swift index 07b21a9272a10..a6ed7f00822a0 100644 --- a/test/embedded/fragile-reference.swift +++ b/test/embedded/fragile-reference.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler diff --git a/test/embedded/no-allocations-print.swift b/test/embedded/no-allocations-print.swift index ae3270463bd12..51f68b525c5d2 100644 --- a/test/embedded/no-allocations-print.swift +++ b/test/embedded/no-allocations-print.swift @@ -1,7 +1,7 @@ // RUN: %target-swift-emit-ir %s -enable-experimental-feature Embedded -no-allocations -// RUN: %target-swift-emit-ir -target armv7-apple-none-macho -no-allocations %s -enable-experimental-feature Embedded -// RUN: %target-swift-emit-ir -target arm64-apple-none-macho -no-allocations %s -enable-experimental-feature Embedded +// RUN: %swift_frontend_plain -emit-ir -target armv7-apple-none-macho -no-allocations %s -enable-experimental-feature Embedded +// RUN: %swift_frontend_plain -emit-ir -target arm64-apple-none-macho -no-allocations %s -enable-experimental-feature Embedded // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler diff --git a/test/embedded/optionset2.swift b/test/embedded/optionset2.swift index babe9b6fe15a4..72f4534ece1ab 100644 --- a/test/embedded/optionset2.swift +++ b/test/embedded/optionset2.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler @@ -8,9 +8,6 @@ // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: swift_feature_Embedded -// https://github.com/apple/swift/issues/73249 -// UNSUPPORTED: OS=windows-msvc - protocol MyOptionSet: Equatable { init(rawValue: Int) init() diff --git a/test/embedded/ouroboros-bug.swift b/test/embedded/ouroboros-bug.swift index 7bceb38af6a76..b6801ec9aae0f 100644 --- a/test/embedded/ouroboros-bug.swift +++ b/test/embedded/ouroboros-bug.swift @@ -3,8 +3,8 @@ // code, but in the embedded Swift's runtime that's somewhat reasonable thing // to do (but is to be avoided because of this). -// RUN: %target-swift-frontend -target armv7-apple-none-macho -assert-config Debug -Osize -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -assert-config Debug -Osize -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -assert-config Debug -Osize -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -assert-config Debug -Osize -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler @@ -13,9 +13,6 @@ // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: swift_feature_Embedded -// https://github.com/apple/swift/issues/73249 -// UNSUPPORTED: OS=windows-msvc - public func test() {} test() diff --git a/test/embedded/ptrauth-none-macho.swift b/test/embedded/ptrauth-none-macho.swift index 057a542d3f800..38a7da4813915 100644 --- a/test/embedded/ptrauth-none-macho.swift +++ b/test/embedded/ptrauth-none-macho.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target arm64e-apple-none-macho -enable-experimental-feature Embedded -emit-ir %s -o - | %FileCheck %s -// RUN: %target-swift-frontend -target arm64e-apple-macos14 -enable-experimental-feature Embedded -emit-ir %s -o - | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64e-apple-none-macho -enable-experimental-feature Embedded -emit-ir %s -o - | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64e-apple-macos14 -enable-experimental-feature Embedded -emit-ir %s -o - | %FileCheck %s // REQUIRES: swift_in_compiler // REQUIRES: OS=macosx diff --git a/test/embedded/static-object-non-darwin.swift b/test/embedded/static-object-non-darwin.swift index 93d14a5aa05b9..6ef10cf278b0c 100644 --- a/test/embedded/static-object-non-darwin.swift +++ b/test/embedded/static-object-non-darwin.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7em-none-none-eabi -parse-as-library -module-name main -O -emit-ir %s -enable-experimental-feature Embedded -Xllvm -link-embedded-runtime=0 | %FileCheck %s -// RUN: %target-swift-frontend -target armv7em-none-none-eabi -parse-as-library -module-name main -Osize -emit-ir %s -enable-experimental-feature Embedded -Xllvm -link-embedded-runtime=0 | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7em-none-none-eabi -parse-as-library -module-name main -O -emit-ir %s -enable-experimental-feature Embedded -Xllvm -link-embedded-runtime=0 | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7em-none-none-eabi -parse-as-library -module-name main -Osize -emit-ir %s -enable-experimental-feature Embedded -Xllvm -link-embedded-runtime=0 | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler diff --git a/test/embedded/stdlib-array.swift b/test/embedded/stdlib-array.swift index 476c736092832..8eb2d44589aa1 100644 --- a/test/embedded/stdlib-array.swift +++ b/test/embedded/stdlib-array.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler @@ -8,9 +8,6 @@ // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: swift_feature_Embedded -// https://github.com/apple/swift/issues/73249 -// UNSUPPORTED: OS=windows-msvc - public func test() { var array: [Int] = [1, 2, 3] array.append(42) diff --git a/test/embedded/stdlib-basic.swift b/test/embedded/stdlib-basic.swift index 3e0c61420490f..9f9d4a2cf592b 100644 --- a/test/embedded/stdlib-basic.swift +++ b/test/embedded/stdlib-basic.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler @@ -7,9 +7,6 @@ // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: swift_feature_Embedded -// https://github.com/apple/swift/issues/73249 -// UNSUPPORTED: OS=windows-msvc - public func bool() -> Bool { return true } diff --git a/test/embedded/stdlib-dictionary.swift b/test/embedded/stdlib-dictionary.swift index ac4dbfbc67214..cccfd232afcf6 100644 --- a/test/embedded/stdlib-dictionary.swift +++ b/test/embedded/stdlib-dictionary.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler @@ -7,9 +7,6 @@ // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: swift_feature_Embedded -// https://github.com/apple/swift/issues/73249 -// UNSUPPORTED: OS=windows-msvc - public func test() { var d: [Int:Int] = [1: 2, 3: 4, 5: 6] d[8] = 9 diff --git a/test/embedded/stdlib-random.swift b/test/embedded/stdlib-random.swift index 4e3eaa4d8a6c9..aabf90e481e2a 100644 --- a/test/embedded/stdlib-random.swift +++ b/test/embedded/stdlib-random.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler @@ -7,9 +7,6 @@ // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: swift_feature_Embedded -// https://github.com/apple/swift/issues/73249 -// UNSUPPORTED: OS=windows-msvc - public func test() { Bool.random() Int.random(in: 0 ..< 100) diff --git a/test/embedded/stdlib-set.swift b/test/embedded/stdlib-set.swift index bf7e0cad3a204..51b29f96f191e 100644 --- a/test/embedded/stdlib-set.swift +++ b/test/embedded/stdlib-set.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler @@ -8,9 +8,6 @@ // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: swift_feature_Embedded -// https://github.com/apple/swift/issues/73249 -// UNSUPPORTED: OS=windows-msvc - public func test() { var s: Set = [1, 2, 3] s.insert(42) diff --git a/test/embedded/stdlib-strings-interpolation3.swift b/test/embedded/stdlib-strings-interpolation3.swift index f98ffc34ed36b..d386350472aa2 100644 --- a/test/embedded/stdlib-strings-interpolation3.swift +++ b/test/embedded/stdlib-strings-interpolation3.swift @@ -1,6 +1,6 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded -// RUN: %target-swift-frontend -target armv7-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded -O -// RUN: %target-swift-frontend -target armv7-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded -Osize +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded -O +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -module-name main -parse-as-library -emit-ir %s -enable-experimental-feature Embedded -Osize // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler diff --git a/test/embedded/stdlib-types-riscv.swift b/test/embedded/stdlib-types-riscv.swift index 820bbfe269616..1a347bff735ff 100644 --- a/test/embedded/stdlib-types-riscv.swift +++ b/test/embedded/stdlib-types-riscv.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target riscv32-none-none-eabi -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target riscv64-none-none-eabi -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target riscv32-none-none-eabi -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target riscv64-none-none-eabi -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler diff --git a/test/embedded/stdlib-types.swift b/test/embedded/stdlib-types.swift index c3f57104122b9..75c2187dd60ed 100644 --- a/test/embedded/stdlib-types.swift +++ b/test/embedded/stdlib-types.swift @@ -1,5 +1,5 @@ -// RUN: %target-swift-frontend -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s -// RUN: %target-swift-frontend -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target armv7-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s +// RUN: %swift_frontend_plain -target arm64-apple-none-macho -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s // UNSUPPORTED: CPU=wasm32 // REQUIRES: swift_in_compiler @@ -8,9 +8,6 @@ // REQUIRES: embedded_stdlib_cross_compiling // REQUIRES: swift_feature_Embedded -// https://github.com/apple/swift/issues/73249 -// UNSUPPORTED: OS=windows-msvc - class MyClass {} public func test() { diff --git a/utils/build.ps1 b/utils/build.ps1 index 51dd8085c2a16..29c49b26ea544 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -1477,7 +1477,7 @@ function Build-CMakeProject { # Disable EnC as that introduces padding in the conformance tables $SwiftFlags += @("-Xlinker", "/INCREMENTAL:NO") # Swift requires COMDAT folding and de-duplication - $SwiftFlags += @("-Xlinker", "/OPT:REF", "-Xlinker", "/OPT:ICF") + $SwiftFlags += @("-Xlinker", "/OPT:REF", "-Xlinker", "/OPT:ICF", "-v", "-Xcc", "-v") Add-FlagsDefine $Defines CMAKE_Swift_FLAGS $SwiftFlags # Workaround CMake 3.26+ enabling `-wmo` by default on release builds