[PATCH] D57607: gn build: Create regular archives for the sanitizer runtimes.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 1 12:34:31 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL352907: gn build: Create regular archives for the sanitizer runtimes. (authored by pcc, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D57607?vs=184803&id=184816#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57607/new/
https://reviews.llvm.org/D57607
Files:
llvm/trunk/utils/gn/build/BUILD.gn
llvm/trunk/utils/gn/build/BUILDCONFIG.gn
llvm/trunk/utils/gn/build/toolchain/BUILD.gn
llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
Index: llvm/trunk/utils/gn/build/BUILDCONFIG.gn
===================================================================
--- llvm/trunk/utils/gn/build/BUILDCONFIG.gn
+++ llvm/trunk/utils/gn/build/BUILDCONFIG.gn
@@ -6,6 +6,7 @@
"//llvm/utils/gn/build:compiler_defaults",
"//llvm/utils/gn/build:llvm_code",
"//llvm/utils/gn/build:no_rtti",
+ "//llvm/utils/gn/build:thin_archive",
"//llvm/utils/gn/build:warn_covered_switch_default",
]
Index: llvm/trunk/utils/gn/build/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/build/BUILD.gn
+++ llvm/trunk/utils/gn/build/BUILD.gn
@@ -136,6 +136,14 @@
}
}
+# To make an archive that can be distributed, you need to remove this config and
+# set complete_static_lib.
+config("thin_archive") {
+ if (current_os != "win" && current_os != "mac") {
+ arflags = [ "-T" ]
+ }
+}
+
config("llvm_code") {
include_dirs = [
"//llvm/include",
Index: llvm/trunk/utils/gn/build/toolchain/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/build/toolchain/BUILD.gn
+++ llvm/trunk/utils/gn/build/toolchain/BUILD.gn
@@ -50,7 +50,7 @@
# Remove the output file first so that ar doesn't try to modify the
# existing file.
command =
- "rm -f {{output}} && $ar rcsDT {{arflags}} {{output}} {{inputs}}"
+ "rm -f {{output}} && $ar rcsD {{arflags}} {{output}} {{inputs}}"
}
description = "AR {{output}}"
outputs = [
Index: llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
+++ llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
@@ -74,7 +74,10 @@
output_dir = crt_current_out_dir
output_name = "clang_rt.hwasan-$crt_current_target"
complete_static_lib = true
- configs -= [ "//llvm/utils/gn/build:llvm_code" ]
+ configs -= [
+ "//llvm/utils/gn/build:llvm_code",
+ "//llvm/utils/gn/build:thin_archive",
+ ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
deps = [
":sources",
@@ -85,7 +88,10 @@
output_dir = crt_current_out_dir
output_name = "clang_rt.hwasan_cxx-$crt_current_target"
complete_static_lib = true
- configs -= [ "//llvm/utils/gn/build:llvm_code" ]
+ configs -= [
+ "//llvm/utils/gn/build:llvm_code",
+ "//llvm/utils/gn/build:thin_archive",
+ ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
deps = [
":cxx_sources",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57607.184816.patch
Type: text/x-patch
Size: 2561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190201/2cd85134/attachment.bin>
More information about the llvm-commits
mailing list