dart-sdk/build/fuchsia/config/clang/BUILD.gn
Ryan Macnak 2cc96bfa0b [vm] Add an ABI for Fuchsia RISC-V.
https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0211_fuchsia_on_risc-v

TEST=./tools/build.py -mrelease -asimriscv64 gen_snapshot_fuchsia gen_snapshot_product_fuchsia
CoreLibraryReviewExempt: VM-only
Change-Id: Ie62addda6c15a5b44e814c49b543319aef4fc5e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281869
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-20 20:46:27 +00:00

32 lines
954 B
Plaintext

# Copyright 2019 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.
import("//build/fuchsia/config/clang/clang.gni")
# This adds the runtime deps for C++ for usage when cross compiling.
group("c++-runtime-deps") {
data_deps = [ ":clang-runtime-libs" ]
}
copy("clang-runtime-libs") {
if (target_cpu == "arm64") {
arch = "aarch64"
} else if (target_cpu == "x64") {
arch = "x86_64"
} else if (target_cpu == "riscv64") {
arch = "riscv64"
} else {
assert(false, "Unsupported target_cpu: $target_cpu")
}
vendor = "unknown"
sys = target_os
sources = [
"${clang_base_path}/lib/${arch}-${vendor}-${sys}/libc++.so.2.0",
"${clang_base_path}/lib/${arch}-${vendor}-${sys}/libc++abi.so.1.0",
"${clang_base_path}/lib/${arch}-${vendor}-${sys}/libunwind.so.1.0",
]
outputs = [ "${root_out_dir}/lib/{{source_name_part}}" ]
}