Skip to content

Commit dbe8f6a

Browse files
committed
Revert "[build] Rely on default host os TARGET_OS unless cross-compiling."
This reverts commit 4167867 as it breaks arm gen_snapshot that are build on linux: ``` $ python tools/build.py -mrelease -aarm --os=android dart process_test runtime_precompiled using /run/user/276040/goma_aam as tmpdir Auto update is skipped because latest/MANIFEST was updated recently. Using goma VERSION=181 (latest) GOMA version 2cc1b3e007b13ab21f982568ba6518c1c29d09e5@1567062346 goma is already running. ninja -C out/ReleaseAndroidARM -j1000 -l64 dart process_test runtime_precompiled ninja: Entering directory `out/ReleaseAndroidARM' [1/1] Regenerating ninja files current_toolchain //build/toolchain/android:clang_arm host_toolchain //build/toolchain/linux:clang_x86 dart_host_toolchain //build/toolchain/linux:clang_x86 current_toolchain //build/toolchain/linux:clang_x86 host_toolchain //build/toolchain/linux:clang_x86 dart_host_toolchain //build/toolchain/linux:clang_x86 ... $ python tools/test.py -n dartkp-android-release-arm ffi/data_not_asan_test ... --- Command "precompiler" (took 39ms): DART_CONFIGURATION=ReleaseAndroidARM out/ReleaseAndroidARM/clang_x86/gen_snapshot --snapshot-kind=app-aot-elf --elf=/usr/local/google/home/aam/p/d/dart-sdk/sdk/out/ReleaseAndroidARM/generated_compilations/dartkp/tests_ffi_data_not_asan_test/out.aotsnapshot --no-sim-use-hardfp --ignore-unrecognized-flags --packages=/usr/local/google/home/aam/p/d/dart-sdk/sdk/.packages /usr/local/google/home/aam/p/d/dart-sdk/sdk/out/ReleaseAndroidARM/generated_compilations/dartkp/tests_ffi_data_not_asan_test/out.dill exit code: 255 stderr: error: import of dart:ffi is not supported in the current Dart runtime --- Re-run this test: python tools/test.py -n dartkp-android-release-arm ffi/data_not_asan_test ``` Change-Id: Ib1d3d11fc7bdb138557cee363681718bc5e88e24 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118474 Reviewed-by: Alexander Aprelev <[email protected]>
1 parent 4895185 commit dbe8f6a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

runtime/BUILD.gn

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ config("dart_nosnapshot_config") {
6767
config("dart_os_config") {
6868
defines = []
6969

70-
# If dart_host_toolchain is the current toolchain then we are building
71-
# the SDK for the host, and should not hardcode these defines.
72-
if (current_toolchain != dart_host_toolchain) {
70+
# If dart_host_toolchain is the current toolchain, and it is different from
71+
# host_toolchain, then we are building the SDK for the host, and should not
72+
# hardcode these defines.
73+
if (current_toolchain != dart_host_toolchain ||
74+
host_toolchain == dart_host_toolchain) {
7375
if (target_os == "android") {
7476
defines += [ "TARGET_OS_ANDROID" ]
7577
} else if (target_os == "fuchsia") {

0 commit comments

Comments
 (0)