Files
TheRock/compiler/amd-llvm/llvm/utils/gn/build/toolchain/target_flags.gni
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

66 lines
1.7 KiB
Plaintext

import("//llvm/triples.gni")
import("//llvm/utils/gn/build/mac_sdk.gni")
import("//llvm/utils/gn/build/toolchain/compiler.gni")
# Flags in this file are passed both to the compiler that's building
# compiler-rt at build time (via normal gn cflags/ldflags), as well as to the
# compiler building compiler-rt test programs at test time (via
# COMPILER_RT_TEST_COMPILER_CFLAGS).
target_flags = []
target_cflags = []
target_ldflags = []
if (current_os == "android") {
target_flags += [
"--target=$llvm_current_triple",
"--sysroot=$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot",
"--gcc-toolchain=$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64",
"-fno-emulated-tls",
]
target_ldflags += [ "-static-libstdc++" ]
if (current_cpu == "arm") {
target_flags += [ "-march=armv7-a" ]
}
} else if (current_os == "ios" || current_os == "mac") {
if (current_cpu == "arm64") {
target_flags += [
"-arch",
"arm64",
]
target_ldflags += [
"-arch",
"arm64",
]
} else if (current_cpu == "x64") {
target_flags += [
"-arch",
"x86_64",
]
target_ldflags += [
"-arch",
"x86_64",
]
}
if (current_os == "mac") {
target_flags += [
"-isysroot",
rebase_path(mac_sdk_path, root_build_dir),
# TODO(lgrey): We should be getting this from `compiler_defaults`. Why
# aren't we?
"-mmacos-version-min=$mac_deployment_target",
]
}
} else if (current_os == "baremetal") {
target_flags += [ "--target=$llvm_current_triple" ]
}
if (current_cpu == "x86") {
if (current_os == "win") {
target_cflags += [ "-m32" ]
} else {
target_flags += [ "-m32" ]
}
}