Skip to content

Commit 42cae95

Browse files
nicoyuxuanchen1997
authored andcommitted
[gn] port abc2eae (bolt standalone)
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250534
1 parent 1916dda commit 42cae95

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

llvm/utils/gn/secondary/bolt/lib/RuntimeLibs/BUILD.gn

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ static_library("RuntimeLibs") {
1818
"InstrumentationRuntimeLibrary.cpp",
1919
"RuntimeLibrary.cpp",
2020
]
21+
22+
# FIXME: Hopefully change this, see
23+
# https://github.com/llvm/llvm-project/pull/97130/files#r1691863361
24+
defines = [ "CMAKE_INSTALL_FULL_LIBDIR=\"\"" ]
2125
}

llvm/utils/gn/secondary/bolt/lib/Utils/BUILD.gn

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1+
import("//llvm/utils/gn/build/write_vcsrevision.gni")
2+
3+
# Configure the VCSVersion.inc file
4+
config("write_vcsrevision_config") {
5+
# To pick up the generated inc file.
6+
include_dirs = [ target_gen_dir ]
7+
visibility = [ ":write_vcsversion" ]
8+
}
9+
10+
write_vcsrevision("write_vcsversion") {
11+
visibility = [ ":Utils" ]
12+
header = "$target_gen_dir/VCSVersion.inc"
13+
names = [ "LLDB" ]
14+
public_configs = [ ":write_vcsrevision_config" ]
15+
}
16+
117
static_library("Utils") {
218
output_name = "LLVMBOLTUtils"
319
configs += [ "//llvm/utils/gn/build:bolt_code" ]
420
deps = [
21+
":write_vcsversion",
522
"//llvm/lib/Support",
623
"//llvm/utils/gn/build/libs/pthread",
724
]

llvm/utils/gn/secondary/bolt/test/BUILD.gn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ write_lit_config("lit_site_cfg") {
4545
"BOLT_ENABLE_RUNTIME=0", # FIXME: enable runtime
4646
"BOLT_TARGETS_TO_BUILD=$bolt_targets_to_build_string",
4747
"GNU_LD_EXECUTABLE=", # FIXME: set sometimes?
48+
"LIBBOLT_RT_HUGIFY=",
49+
"LIBBOLT_RT_INSTR=",
4850
"LLVM_HOST_TRIPLE=$llvm_current_triple",
4951
"LLVM_USE_SANITIZER=",
5052
"Python3_EXECUTABLE=$python_path",

0 commit comments

Comments
 (0)