}
}
+# 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",
"//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",
]
# 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 = [
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",
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",