Skip to content

Commit

Permalink
[gn] Port f84ac48 (BOLT_TARGETS_TO_BUILD)
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed Apr 21, 2023
1 parent 41f148e commit cd77f92
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion llvm/utils/gn/secondary/bolt/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ template("write_lit_config") {
}

write_lit_config("lit_site_cfg") {
bolt_targets_to_build_string = ""
if (llvm_build_AArch64) {
bolt_targets_to_build_string += "AArch64"
}
if (llvm_build_X86) {
if (bolt_targets_to_build_string != "") {
bolt_targets_to_build_string += " "
}
bolt_targets_to_build_string += "X86"
}

# Fully-qualified instead of relative for LIT_SITE_CFG_IN_HEADER.
input = "//bolt/test/lit.site.cfg.py.in"
output = bolt_lit_site_cfg_file
Expand All @@ -32,11 +43,11 @@ write_lit_config("lit_site_cfg") {
"BOLT_CLANG_EXE=" + rebase_path("$root_build_dir/bin/clang"),
"BOLT_LLD_EXE=" + rebase_path("$root_build_dir/bin/ld.lld"),
"BOLT_ENABLE_RUNTIME=0", # FIXME: enable runtime
"BOLT_TARGETS_TO_BUILD=$bolt_targets_to_build_string",
"GNU_LD_EXECUTABLE=", # FIXME: set sometimes?
"LLVM_HOST_TRIPLE=$llvm_current_triple",
"LLVM_USE_SANITIZER=",
"Python3_EXECUTABLE=$python_path",
"TARGETS_TO_BUILD=$llvm_targets_to_build_string",
]

if (host_os == "win") {
Expand Down

0 comments on commit cd77f92

Please sign in to comment.