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]>,


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]>,
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to