[PATCH] D117266: [gn build] Add support for building using propellor
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 17:41:49 PST 2022
aeubanks created this revision.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117266
Files:
llvm/utils/gn/build/BUILD.gn
Index: llvm/utils/gn/build/BUILD.gn
===================================================================
--- llvm/utils/gn/build/BUILD.gn
+++ llvm/utils/gn/build/BUILD.gn
@@ -24,6 +24,9 @@
# The version of host gcc. Ignored if is_clang is true.
gcc_version = 9
+
+ propellor_phase = 0
+ propellor_profile_dir = ""
}
assert(!llvm_build_instrumented_coverage || is_clang,
@@ -45,6 +48,23 @@
cflags_cc = []
ldflags = target_flags + target_ldflags
+ if (propellor_phase == 1) {
+ cflags += [
+ "-funique-internal-linkage-names",
+ "-fbasic-block-sections=labels",
+ ]
+ } else if (propellor_phase == 2) {
+ assert(propellor_profile_dir != "", "")
+ cflags += [
+ "-funique-internal-linkage-names",
+ "-fbasic-block-sections=list=" + propellor_profile_dir + "/cluster.txt",
+ ]
+ ldflags += [
+ "-Wl,--symbol-ordering-file=" + propellor_profile_dir + "/symorder.txt",
+ "-Wl,--no-warn-symbol-ordering",
+ ]
+ }
+
# Mostly for compiler-rt, see compiler-rt/cmake/config-ix.cmake
if (current_os == "ios") {
asmflags += [ "-miphoneos-version-min=8.0" ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117266.399856.patch
Type: text/x-patch
Size: 1130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220114/185b8868/attachment.bin>
More information about the llvm-commits
mailing list