[PATCH] D37726: clang: alias -static-{libstdc++, libgcc} for LLVM variants

Martell Malone via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 11 18:55:12 PDT 2017


martell created this revision.

Alias `-static-compiler-rt` and `static-libc++` to their gcc counterparts.
Currently invoking `-static-libgcc` or `-static-libstdc++` will ensure only use of static libs.
In future if we want to do more accurate handling with better behaviour with the linker we can remove the alias and pass a custom flag.
For now this would be a great alias for sanity.


Repository:
  rL LLVM

https://reviews.llvm.org/D37726

Files:
  include/clang/Driver/Options.td


Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -2270,7 +2270,9 @@
 def specs_EQ : Joined<["-", "--"], "specs=">;
 def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>;
 def static_libgcc : Flag<["-"], "static-libgcc">;
+def static_compiler_rt : Flag<["-"], "static-compiler-rt">, Alias<static_libgcc>;
 def static_libstdcxx : Flag<["-"], "static-libstdc++">;
+def static_libcxx : Flag<["-"], "static-libc++">, Alias<static_libstdcxx>;
 def static : Flag<["-", "--"], "static">, Flags<[NoArgumentUnused]>;
 def std_default_EQ : Joined<["-"], "std-default=">;
 def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option]>,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37726.114751.patch
Type: text/x-patch
Size: 768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170912/802430c0/attachment.bin>


More information about the cfe-commits mailing list