blob: 5ecde0a07982aeacba552094ce43feaef0881470 [file] [log] [blame]
# Copyright 2016 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
# The absolute path of the sysroot that is used with the target toolchain.
target_sysroot = ""
}
if (current_os == target_os && target_sysroot != "") {
sysroot = target_sysroot
} else if (is_fuchsia) {
_out_dir =
get_label_info("//zircon/public/sysroot(//build/zircon:zircon_toolchain)",
"target_out_dir")
sysroot = rebase_path("$_out_dir/sysroot")
} else if (is_linux) {
sysroot = rebase_path("//buildtools/${host_platform}/sysroot")
} else if (is_mac) {
import("//build/config/mac/config.gni")
sysroot = mac_sdk_path
} else {
sysroot = ""
}