r276848 - Support setting default value for -rtlib at build time

2016-07-27 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Wed Jul 27 03:15:54 2016 New Revision: 276848 URL: http://llvm.org/viewvc/llvm-project?rev=276848&view=rev Log: Support setting default value for -rtlib at build time This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default v

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-27 Thread Jonas Hahnfeld via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL276848: Support setting default value for -rtlib at build time (authored by Hahnfeld). Changed prior to commit: https://reviews.llvm.org/D22663?vs=65643&id=65678#toc Repository: rL LLVM h

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-27 Thread Lei Zhang via cfe-commits
zlei added a comment. @Hahnfeld Could you please commit it? I don't have the access. Thanks :) https://reviews.llvm.org/D22663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld accepted this revision. Hahnfeld added a comment. This revision is now accepted and ready to land. LGTM, thanks for this work! Can you commit the patch yourself or should I do that for you? https://reviews.llvm.org/D22663 ___ cfe-commits m

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei added a comment. @Hahnfeld Your patch applied. Thanks. https://reviews.llvm.org/D22663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei updated this revision to Diff 65643. zlei added a comment. Fix a bug on Darwin that crashes clang when `CLANG_DEFAULT_RTLIB=libgcc` https://reviews.llvm.org/D22663 Files: CMakeLists.txt include/clang/Config/config.h.cmake lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp lib/Dri

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Chris Bieneman via cfe-commits
beanz added inline comments. Comment at: CMakeLists.txt:210 @@ -202,3 +209,3 @@ set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING "Vendor-specific text for showing with version information.") Hahnfeld wrote: > zlei wrote: > > Hahnfeld wrote: > > > zlei wrote:

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld added a comment. There is also the other way round: `CLANG_DEFAULT_RTLIB=libgcc` shows that Darwin doesn't support that and gets a `SIGSEGV` (because it doesn't expect it to be `libgcc` without an option to be set, hehe) Based on some `GetCXXStdlibType` for toolchains that only support

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei added inline comments. Comment at: CMakeLists.txt:210 @@ -202,3 +209,3 @@ set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING "Vendor-specific text for showing with version information.") Hahnfeld wrote: > zlei wrote: > > I think the original code for reset

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld added inline comments. Comment at: CMakeLists.txt:210 @@ -202,3 +209,3 @@ set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING "Vendor-specific text for showing with version information.") zlei wrote: > I think the original code for resetting `CLANG_DEFA

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei added inline comments. Comment at: CMakeLists.txt:210 @@ -202,3 +209,3 @@ set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING "Vendor-specific text for showing with version information.") I think the original code for resetting `CLANG_DEFAULT_CXX_STDLIB` do

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei updated this revision to Diff 65497. zlei added a comment. Herald added subscribers: srhines, danalbert, tberghammer. Support a new option `-rtlib=platform` for internal use, and fix tests that previously failed when configured with `CLANG_DEFAULT_RTLIB=compiler-rt`. https://reviews.llvm.o

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-25 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D22663#495728, @zlei wrote: > In https://reviews.llvm.org/D22663#494460, @Hahnfeld wrote: > > > With the changes applied and configured with > > `CLANG_DEFAULT_RTLIB=compiler-rt` some tests fail so you may have to adapt > > the idea of `-rtl

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-25 Thread Lei Zhang via cfe-commits
zlei added a comment. In https://reviews.llvm.org/D22663#494460, @Hahnfeld wrote: > With the changes applied and configured with > `CLANG_DEFAULT_RTLIB=compiler-rt` some tests fail so you may have to adapt > the idea of `-rtlib=platform` for the tests. Got it. And I also need to fix those fai

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-25 Thread Chris Bieneman via cfe-commits
beanz added a subscriber: beanz. beanz added a comment. One small comment on the CMake code. Comment at: CMakeLists.txt:210 @@ +209,3 @@ + message(WARNING "Resetting default rtlib to use platform default") + set(CLANG_DEFAULT_RTLIB "") +endif() You'll want thi

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-25 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld requested changes to this revision. Hahnfeld added a comment. This revision now requires changes to proceed. In general the idea looks good and takes this point off my personal todo list :-) With the changes applied and configured with `CLANG_DEFAULT_RTLIB=compiler-rt` some tests fail

[PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-21 Thread Lei Zhang via cfe-commits
zlei created this revision. zlei added reviewers: cfe-commits, ddunbar, Hahnfeld. This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru CLANG_DEFA

Support setting default value for -rtlib at build time

2016-07-17 Thread Lei Zhang via cfe-commits
Hi, This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru CLANG_DEFAULT_CXX_STDLIB. With these two options, we can configure clang to build binar