[embedded] Build the stdlib for x86_64 too, and run executable tests on x86_64

This commit is contained in:
Kuba Mracek
2023-09-18 20:25:32 -07:00
parent 2cb22f5c60
commit e898a9a4fd
5 changed files with 12 additions and 12 deletions

View File

@@ -1322,6 +1322,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
if (Opts.hasFeature(Feature::Embedded)) {
Opts.UnavailableDeclOptimizationMode = UnavailableDeclOptimization::Complete;
Opts.DisableImplicitStringProcessingModuleImport = true;
Opts.DisableImplicitConcurrencyModuleImport = true;
Opts.EnableObjCInterop = false;
if (FrontendOpts.EnableLibraryEvolution) {
Diags.diagnose(SourceLoc(), diag::evolution_with_embedded);

View File

@@ -397,9 +397,10 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
add_custom_target(embedded-stdlib ALL)
set(EMBEDDED_STDLIB_TARGET_TRIPLES
# arch module_name target triple
"armv7 armv7-apple-none-macho armv7-apple-none-macho"
"arm64 arm64-apple-none-macho arm64-apple-none-macho"
"arm64 arm64-apple-macos arm64-apple-macos11"
"armv7 armv7-apple-none-macho armv7-apple-none-macho"
"arm64 arm64-apple-none-macho arm64-apple-none-macho"
"x86_64 x86_64-apple-macos x86_64-apple-macos10.13"
"arm64 arm64-apple-macos arm64-apple-macos10.13"
)
set(SWIFT_ENABLE_REFLECTION OFF)

View File

@@ -1,12 +1,11 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -target arm64-apple-none-macho -Xcc -D__MACH__ -Xcc -D__arm64__ -Xcc -D__APPLE__ \
// RUN: -enable-experimental-feature Embedded -enforce-exclusivity=none %s -c -o %t/a.o
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -enforce-exclusivity=none %s -c -o %t/a.o
// RUN: %target-clang %t/a.o -o %t/a.out
// RUN: %target-run %t/a.out | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: VENDOR=apple
// REQUIRES: CPU=arm64
// REQUIRES: OS=macosx
@_silgen_name("putchar")
func putchar(_: UInt8)

View File

@@ -1,12 +1,11 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -target arm64-apple-none-macho -Xcc -D__MACH__ -Xcc -D__arm64__ -Xcc -D__APPLE__ \
// RUN: -enable-experimental-feature Embedded -enforce-exclusivity=none %s -c -o %t/a.o
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -enforce-exclusivity=none %s -c -o %t/a.o
// RUN: %target-clang %t/a.o -o %t/a.out
// RUN: %target-run %t/a.out | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: VENDOR=apple
// REQUIRES: CPU=arm64
// REQUIRES: OS=macosx
@_silgen_name("putchar")
func putchar(_: UInt8)

View File

@@ -1,12 +1,11 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -target arm64-apple-none-macho -Xcc -D__MACH__ -Xcc -D__arm64__ -Xcc -D__APPLE__ \
// RUN: -lto=llvm-full %s -enable-experimental-feature Embedded -emit-bc -o %t/a.o
// RUN: %target-swift-frontend -lto=llvm-full %s -enable-experimental-feature Embedded -emit-bc -o %t/a.o
// RUN: %target-clang %t/a.o -o %t/a.out
// RUN: %target-run %t/a.out | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: VENDOR=apple
// REQUIRES: CPU=arm64
// REQUIRES: OS=macosx
@_silgen_name("putchar")
func putchar(_: UInt8)