Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions sdk/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import("../build/executable_suffix.gni")
import("../sdk_args.gni")
import("../utils/application_snapshot.gni")

# If we're are embedded in another GN buildroot, such as Flutter, the sysroot
# might already be imported from elsewhere.
if (get_path_info(".", "abspath") == "//sdk/") {
import("../build/config/sysroot.gni")
}

declare_args() {
# Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries.
dart_platform_sdk = true
Expand Down Expand Up @@ -379,10 +385,11 @@ copy_sanitizer_deps = []
# If the default toolchain is already using a sanitizer, the sanitizer variant
# toolchains will try to use multiple sanitizers at the same time, which
# doesn't work. If we're not on Linux, the sanitizers are not statically linked
# and not useable outside our tree. If we're are embedded in another GN
# buildroot, such as Flutter, the sanitizer variant toolchains might not be
# defined.
# and not useable outside our tree. If we're on Linux with musl-libc, the
# sanitizers don't work. If we're are embedded in another GN buildroot, such as
# Flutter, the sanitizer variant toolchains might not be defined.
if (!using_sanitizer && current_os == "linux" &&
!(defined(dart_sysroot) && dart_sysroot == "alpine") &&
get_path_info(".", "abspath") == "//sdk/") {
sanitizers = []
if (current_cpu == "x64" || current_cpu == "arm64") {
Expand Down