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

2018-12-04 Thread Martell Malone via Phabricator via cfe-commits
martell abandoned this revision.
martell added a comment.

Dropping in favour of D53238 


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D37726/new/

https://reviews.llvm.org/D37726



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2018-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment.

In https://reviews.llvm.org/D37726#1264233, @rsmith wrote:

> It would be nice to have a flag here that's agnostic to the value supplied to 
> `-rtlib` or `-stdlib`. Perhaps `-static-rtlib` (for either libgcc or 
> compiler-rt) and `-static-stdlib` (for either libc++ or libstdc++). (Yes, 
> it's bad that we use `stdlib` to mean "the C++ standard library", but that is 
> the status quo.)


https://reviews.llvm.org/rC113891 introduced `-stdlib`... yes it would be nice 
if it were named `-c++stdlib` or `-cxxstdlib`... (I'm not good at naming)

We don't need to be 100% compatible with gcc here.. `--push-state` `-Bstatic` 
`-lc++/-lstdc++` `--pop-state` can also be used. `--pop-state` works with 
ld.bfd/gold/lld


Repository:
  rL LLVM

https://reviews.llvm.org/D37726



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment.

It would be nice to have a flag here that's agnostic to the value supplied to 
`-rtlib` or `-stdlib`. Perhaps `-static-rtlib` (for either libgcc or 
compiler-rt) and `-static-stdlib` (for either libc++ or libstdc++). (Yes, it's 
bad that we use `stdlib` to mean "the C++ standard library", but that is the 
status quo.)


Repository:
  rL LLVM

https://reviews.llvm.org/D37726



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2017-09-11 Thread Martell Malone via Phabricator via cfe-commits
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;
 def static_libstdcxx : Flag<["-"], "static-libstdc++">;
+def static_libcxx : Flag<["-"], "static-libc++">, Alias;
 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;
 def static_libstdcxx : Flag<["-"], "static-libstdc++">;
+def static_libcxx : Flag<["-"], "static-libc++">, Alias;
 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