Skip to content

Commit e898a9a

Browse files
committed
[embedded] Build the stdlib for x86_64 too, and run executable tests on x86_64
1 parent 2cb22f5 commit e898a9a

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
13221322
if (Opts.hasFeature(Feature::Embedded)) {
13231323
Opts.UnavailableDeclOptimizationMode = UnavailableDeclOptimization::Complete;
13241324
Opts.DisableImplicitStringProcessingModuleImport = true;
1325+
Opts.DisableImplicitConcurrencyModuleImport = true;
1326+
Opts.EnableObjCInterop = false;
13251327

13261328
if (FrontendOpts.EnableLibraryEvolution) {
13271329
Diags.diagnose(SourceLoc(), diag::evolution_with_embedded);

stdlib/public/core/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,10 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
397397
add_custom_target(embedded-stdlib ALL)
398398
set(EMBEDDED_STDLIB_TARGET_TRIPLES
399399
# arch module_name target triple
400-
"armv7 armv7-apple-none-macho armv7-apple-none-macho"
401-
"arm64 arm64-apple-none-macho arm64-apple-none-macho"
402-
"arm64 arm64-apple-macos arm64-apple-macos11"
400+
"armv7 armv7-apple-none-macho armv7-apple-none-macho"
401+
"arm64 arm64-apple-none-macho arm64-apple-none-macho"
402+
"x86_64 x86_64-apple-macos x86_64-apple-macos10.13"
403+
"arm64 arm64-apple-macos arm64-apple-macos10.13"
403404
)
404405

405406
set(SWIFT_ENABLE_REFLECTION OFF)

test/embedded/collection.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -target arm64-apple-none-macho -Xcc -D__MACH__ -Xcc -D__arm64__ -Xcc -D__APPLE__ \
3-
// RUN: -enable-experimental-feature Embedded -enforce-exclusivity=none %s -c -o %t/a.o
2+
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -enforce-exclusivity=none %s -c -o %t/a.o
43
// RUN: %target-clang %t/a.o -o %t/a.out
54
// RUN: %target-run %t/a.out | %FileCheck %s
65

76
// REQUIRES: executable_test
87
// REQUIRES: VENDOR=apple
9-
// REQUIRES: CPU=arm64
8+
// REQUIRES: OS=macosx
109

1110
@_silgen_name("putchar")
1211
func putchar(_: UInt8)

test/embedded/custom-print.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -target arm64-apple-none-macho -Xcc -D__MACH__ -Xcc -D__arm64__ -Xcc -D__APPLE__ \
3-
// RUN: -enable-experimental-feature Embedded -enforce-exclusivity=none %s -c -o %t/a.o
2+
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -enforce-exclusivity=none %s -c -o %t/a.o
43
// RUN: %target-clang %t/a.o -o %t/a.out
54
// RUN: %target-run %t/a.out | %FileCheck %s
65

76
// REQUIRES: executable_test
87
// REQUIRES: VENDOR=apple
9-
// REQUIRES: CPU=arm64
8+
// REQUIRES: OS=macosx
109

1110
@_silgen_name("putchar")
1211
func putchar(_: UInt8)

test/embedded/lto.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -target arm64-apple-none-macho -Xcc -D__MACH__ -Xcc -D__arm64__ -Xcc -D__APPLE__ \
3-
// RUN: -lto=llvm-full %s -enable-experimental-feature Embedded -emit-bc -o %t/a.o
2+
// RUN: %target-swift-frontend -lto=llvm-full %s -enable-experimental-feature Embedded -emit-bc -o %t/a.o
43
// RUN: %target-clang %t/a.o -o %t/a.out
54
// RUN: %target-run %t/a.out | %FileCheck %s
65

76
// REQUIRES: executable_test
87
// REQUIRES: VENDOR=apple
9-
// REQUIRES: CPU=arm64
8+
// REQUIRES: OS=macosx
109

1110
@_silgen_name("putchar")
1211
func putchar(_: UInt8)

0 commit comments

Comments
 (0)