diff options
Diffstat (limited to 'llvm/utils/gn/build')
-rw-r--r-- | llvm/utils/gn/build/BUILD.gn | 8 | ||||
-rw-r--r-- | llvm/utils/gn/build/BUILDCONFIG.gn | 1 | ||||
-rw-r--r-- | llvm/utils/gn/build/toolchain/BUILD.gn | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn index 4c5c3bbbb39..cd22d21bcb4 100644 --- a/llvm/utils/gn/build/BUILD.gn +++ b/llvm/utils/gn/build/BUILD.gn @@ -136,6 +136,14 @@ config("no_rtti") { } } +# 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", diff --git a/llvm/utils/gn/build/BUILDCONFIG.gn b/llvm/utils/gn/build/BUILDCONFIG.gn index cec736fd8fa..7de638ff3df 100644 --- a/llvm/utils/gn/build/BUILDCONFIG.gn +++ b/llvm/utils/gn/build/BUILDCONFIG.gn @@ -6,6 +6,7 @@ shared_binary_target_configs = [ "//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", ] diff --git a/llvm/utils/gn/build/toolchain/BUILD.gn b/llvm/utils/gn/build/toolchain/BUILD.gn index 4be5e4b8f31..5ba76d4ea55 100644 --- a/llvm/utils/gn/build/toolchain/BUILD.gn +++ b/llvm/utils/gn/build/toolchain/BUILD.gn @@ -50,7 +50,7 @@ template("unix_toolchain") { # 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 = [ |