41 строка
1.1 KiB
Plaintext
41 строка
1.1 KiB
Plaintext
# Copyright 2017 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/config/fuchsia/config.gni")
|
|
import("//build/config/sysroot.gni")
|
|
|
|
assert(is_fuchsia)
|
|
assert(is_posix)
|
|
|
|
config("compiler") {
|
|
defines = [ "SYSROOT_VERSION=$sysroot_version" ]
|
|
cflags = []
|
|
ldflags = []
|
|
if (current_cpu == "arm64") {
|
|
cflags += [ "--target=aarch64-fuchsia" ]
|
|
ldflags += [ "--target=aarch64-fuchsia" ]
|
|
} else if (current_cpu == "x64") {
|
|
cflags += [ "--target=x86_64-fuchsia" ]
|
|
ldflags += [ "--target=x86_64-fuchsia" ]
|
|
} else {
|
|
assert(false, "Unsupported architecture")
|
|
}
|
|
asmflags = cflags
|
|
|
|
# TODO(thakis): Once Fuchsia's libclang_rt.builtin no longer has upstream
|
|
# patches, we might want to make tools/clang/scripts/update.py build it
|
|
# and bundle it with the clang package instead of using the library from
|
|
# the SDK, https://crbug.com/724204
|
|
ldflags += [
|
|
"-resource-dir",
|
|
rebase_path(fuchsia_sdk, root_build_dir) + "/toolchain_libs/clang/5.0.0",
|
|
]
|
|
|
|
libs = [
|
|
"mxio",
|
|
"magenta",
|
|
"unwind",
|
|
]
|
|
}
|