From a03f6e5b3ae6d835c9ee962d4b8c7792a03a622d Mon Sep 17 00:00:00 2001 From: Finagolfin Date: Wed, 1 Nov 2023 07:27:01 +0530 Subject: [PATCH] [Build] Enable building and CI testing the early Swift Driver on linux with the prebuilt host toolchain --- test/Driver/Dependencies/only-skip-once.swift | 6 +++--- .../swift_build_support/products/earlyswiftdriver.py | 6 ------ .../BuildSystem/infer_dumps_deps_if_verbose_build.test | 2 +- .../BuildSystem/test_early_swift_driver_and_infer.swift | 2 +- .../BuildSystem/test_early_swift_driver_and_test.test | 2 +- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/test/Driver/Dependencies/only-skip-once.swift b/test/Driver/Dependencies/only-skip-once.swift index f632dbd934505..720413f83cb64 100644 --- a/test/Driver/Dependencies/only-skip-once.swift +++ b/test/Driver/Dependencies/only-skip-once.swift @@ -1,4 +1,4 @@ -// XFAIL: OS=linux-gnu, OS=openbsd, OS=windows-msvc, OS=linux-android, OS=linux-androideabi +// XFAIL: OS=openbsd, OS=windows-msvc // RUN: %empty-directory(%t) // RUN: cp -r %S/Inputs/only-skip-once/* %t @@ -9,7 +9,7 @@ // CHECK-INITIAL: {{(Job finished: {compile: main.o <= main.swift}|Finished Compiling main.swift)}} // CHECK-INITIAL: {{(Job finished: {compile: file1.o <= file1.swift}|Finished Compiling file1.swift)}} // CHECK-INITIAL: {{(Job finished: {compile: file2.o <= file2.swift}|Finished Compiling file2.swift)}} -// CHECK-INITIAL: {{(Job finished: {link: main <= main.o file1.o file2.o}|Finished Linking main)}} +// CHECK-INITIAL: {{(Job finished: {link: main <= main.o file1.o file2.o|Finished Linking main)}} // RUN: touch -t 201401240006 %t/file2.swift // RUN: cd %t && %target-swiftc_driver -driver-show-job-lifecycle -output-file-map %t/output-file-map.json -incremental main.swift file1.swift file2.swift -j1 2>&1 | %FileCheck -check-prefix=CHECK-REBUILD %s @@ -18,5 +18,5 @@ // CHECK-REBUILD-DAG: {{(Job finished: {compile: file2.o <= file2.swift}|Finished Compiling file2.swift)}} // CHECK-REBUILD-DAG: {{(Job skipped: {compile: main.o <= main.swift}|Skipped Compiling main.swift)}} // CHECK-REBUILD-DAG: {{(Job skipped: {compile: file1.o <= file1.swift}|Skipped Compiling file1.swift)}} -// CHECK-REBUILD-DAG: {{(Job finished: {link: main <= main.o file1.o file2.o}|Finished Linking main)}} +// CHECK-REBUILD-DAG: {{(Job finished: {link: main <= main.o file1.o file2.o|Finished Linking main)}} // CHECK-REBUILD-NOT: {{(Job skipped:|Skipped)}} diff --git a/utils/swift_build_support/swift_build_support/products/earlyswiftdriver.py b/utils/swift_build_support/swift_build_support/products/earlyswiftdriver.py index 62c5222a54bf3..46b64231b63d6 100644 --- a/utils/swift_build_support/swift_build_support/products/earlyswiftdriver.py +++ b/utils/swift_build_support/swift_build_support/products/earlyswiftdriver.py @@ -11,7 +11,6 @@ # ---------------------------------------------------------------------------- import os -import sys from . import product from .. import shell @@ -42,11 +41,6 @@ def is_before_build_script_impl_product(cls): return True def should_build(self, host_target): - # Temporarily disable for non-darwin since this build never works - # outside of that case currently. - if sys.platform != 'darwin': - return False - if self.is_cross_compile_target(host_target): return False diff --git a/validation-test/BuildSystem/infer_dumps_deps_if_verbose_build.test b/validation-test/BuildSystem/infer_dumps_deps_if_verbose_build.test index 3896eb683393b..5cfe414ef81b8 100644 --- a/validation-test/BuildSystem/infer_dumps_deps_if_verbose_build.test +++ b/validation-test/BuildSystem/infer_dumps_deps_if_verbose_build.test @@ -2,7 +2,7 @@ # RUN: mkdir -p %t # RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --verbose-build --dry-run --infer --swiftpm --cmake %cmake 2>&1 | %FileCheck %s -# REQUIRES: standalone_build, OS=macosx +# REQUIRES: standalone_build # Just make sure we compute the build graph/emit output. # diff --git a/validation-test/BuildSystem/test_early_swift_driver_and_infer.swift b/validation-test/BuildSystem/test_early_swift_driver_and_infer.swift index 8a788281adaf9..ec3190613e681 100644 --- a/validation-test/BuildSystem/test_early_swift_driver_and_infer.swift +++ b/validation-test/BuildSystem/test_early_swift_driver_and_infer.swift @@ -1,4 +1,4 @@ -# REQUIRES: standalone_build, OS=macosx +# REQUIRES: standalone_build # RUN: %empty-directory(%t) # RUN: mkdir -p %t diff --git a/validation-test/BuildSystem/test_early_swift_driver_and_test.test b/validation-test/BuildSystem/test_early_swift_driver_and_test.test index b2eb4bc89e962..4e9e8b12e7f91 100644 --- a/validation-test/BuildSystem/test_early_swift_driver_and_test.test +++ b/validation-test/BuildSystem/test_early_swift_driver_and_test.test @@ -1,4 +1,4 @@ -# REQUIRES: standalone_build, OS=macosx +# REQUIRES: standalone_build # RUN: %empty-directory(%t) # RUN: mkdir -p %t