Re: r279035 - [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

2016-08-18 Thread Vedant Kumar via cfe-commits
I shouldn't have assumed that this was correct because it built.

Reverted in r279097.

vedant

> On Aug 18, 2016, at 9:25 AM, Richard Smith  wrote:
> 
> This doesn't work at all, llvm-config.h does not provide the relevant 
> configuration macros.
> 
> 
> On 17 Aug 2016 11:56 p.m., "Vedant Kumar via cfe-commits" 
>  wrote:
> Author: vedantk
> Date: Thu Aug 18 01:43:07 2016
> New Revision: 279035
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=279035=rev
> Log:
> [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds
> 
> llvm/Config/config.h has intentionally been excluded from llvm
> installations (see: llvm/CMakeLists.txt). Un-break out-of-tree builds
> post-r278882 by switching to llvm-config.h, which is exported.
> 
> Suggested by Will Dietz!
> 
> Modified:
> cfe/trunk/tools/driver/cc1_main.cpp
> 
> Modified: cfe/trunk/tools/driver/cc1_main.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=279035=279034=279035=diff
> ==
> --- cfe/trunk/tools/driver/cc1_main.cpp (original)
> +++ cfe/trunk/tools/driver/cc1_main.cpp Thu Aug 18 01:43:07 2016
> @@ -25,7 +25,7 @@
>  #include "clang/Frontend/Utils.h"
>  #include "clang/FrontendTool/Utils.h"
>  #include "llvm/ADT/Statistic.h"
> -#include "llvm/Config/config.h"
> +#include "llvm/Config/llvm-config.h"
>  #include "llvm/LinkAllPasses.h"
>  #include "llvm/Option/ArgList.h"
>  #include "llvm/Option/OptTable.h"
> 
> 
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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


Re: r279035 - [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

2016-08-18 Thread Richard Smith via cfe-commits
On 18 Aug 2016 9:36 a.m., "Reid Kleckner"  wrote:
>
> Clang isn't allowed to use LLVM's config.h, though, specifically to
support the standalone build.
>
> You can either create equivalent LLVM_ prefixed macros in
llvm-config.h.cmake, or repeat the checks and define the same macros in
clang/include/clang/Config/config.h.cmake.

Perhaps the best thing would be to move this functionality into LLVM and
just call it from clang.

> On Thu, Aug 18, 2016 at 9:25 AM, Richard Smith via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
>>
>> This doesn't work at all, llvm-config.h does not provide the relevant
configuration macros.
>>
>>
>> On 17 Aug 2016 11:56 p.m., "Vedant Kumar via cfe-commits" <
cfe-commits@lists.llvm.org> wrote:
>>>
>>> Author: vedantk
>>> Date: Thu Aug 18 01:43:07 2016
>>> New Revision: 279035
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=279035=rev
>>> Log:
>>> [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds
>>>
>>> llvm/Config/config.h has intentionally been excluded from llvm
>>> installations (see: llvm/CMakeLists.txt). Un-break out-of-tree builds
>>> post-r278882 by switching to llvm-config.h, which is exported.
>>>
>>> Suggested by Will Dietz!
>>>
>>> Modified:
>>> cfe/trunk/tools/driver/cc1_main.cpp
>>>
>>> Modified: cfe/trunk/tools/driver/cc1_main.cpp
>>> URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=279035=279034=279035=diff
>>>
==
>>> --- cfe/trunk/tools/driver/cc1_main.cpp (original)
>>> +++ cfe/trunk/tools/driver/cc1_main.cpp Thu Aug 18 01:43:07 2016
>>> @@ -25,7 +25,7 @@
>>>  #include "clang/Frontend/Utils.h"
>>>  #include "clang/FrontendTool/Utils.h"
>>>  #include "llvm/ADT/Statistic.h"
>>> -#include "llvm/Config/config.h"
>>> +#include "llvm/Config/llvm-config.h"
>>>  #include "llvm/LinkAllPasses.h"
>>>  #include "llvm/Option/ArgList.h"
>>>  #include "llvm/Option/OptTable.h"
>>>
>>>
>>> ___
>>> cfe-commits mailing list
>>> cfe-commits@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r279035 - [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

2016-08-18 Thread Reid Kleckner via cfe-commits
Clang isn't allowed to use LLVM's config.h, though, specifically to support
the standalone build.

You can either create equivalent LLVM_ prefixed macros in
llvm-config.h.cmake, or repeat the checks and define the same macros in
clang/include/clang/Config/config.h.cmake.

On Thu, Aug 18, 2016 at 9:25 AM, Richard Smith via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> This doesn't work at all, llvm-config.h does not provide the relevant
> configuration macros.
>
> On 17 Aug 2016 11:56 p.m., "Vedant Kumar via cfe-commits" <
> cfe-commits@lists.llvm.org> wrote:
>
>> Author: vedantk
>> Date: Thu Aug 18 01:43:07 2016
>> New Revision: 279035
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=279035=rev
>> Log:
>> [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds
>>
>> llvm/Config/config.h has intentionally been excluded from llvm
>> installations (see: llvm/CMakeLists.txt). Un-break out-of-tree builds
>> post-r278882 by switching to llvm-config.h, which is exported.
>>
>> Suggested by Will Dietz!
>>
>> Modified:
>> cfe/trunk/tools/driver/cc1_main.cpp
>>
>> Modified: cfe/trunk/tools/driver/cc1_main.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/
>> cc1_main.cpp?rev=279035=279034=279035=diff
>> 
>> ==
>> --- cfe/trunk/tools/driver/cc1_main.cpp (original)
>> +++ cfe/trunk/tools/driver/cc1_main.cpp Thu Aug 18 01:43:07 2016
>> @@ -25,7 +25,7 @@
>>  #include "clang/Frontend/Utils.h"
>>  #include "clang/FrontendTool/Utils.h"
>>  #include "llvm/ADT/Statistic.h"
>> -#include "llvm/Config/config.h"
>> +#include "llvm/Config/llvm-config.h"
>>  #include "llvm/LinkAllPasses.h"
>>  #include "llvm/Option/ArgList.h"
>>  #include "llvm/Option/OptTable.h"
>>
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r279035 - [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

2016-08-18 Thread Richard Smith via cfe-commits
This doesn't work at all, llvm-config.h does not provide the relevant
configuration macros.

On 17 Aug 2016 11:56 p.m., "Vedant Kumar via cfe-commits" <
cfe-commits@lists.llvm.org> wrote:

> Author: vedantk
> Date: Thu Aug 18 01:43:07 2016
> New Revision: 279035
>
> URL: http://llvm.org/viewvc/llvm-project?rev=279035=rev
> Log:
> [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds
>
> llvm/Config/config.h has intentionally been excluded from llvm
> installations (see: llvm/CMakeLists.txt). Un-break out-of-tree builds
> post-r278882 by switching to llvm-config.h, which is exported.
>
> Suggested by Will Dietz!
>
> Modified:
> cfe/trunk/tools/driver/cc1_main.cpp
>
> Modified: cfe/trunk/tools/driver/cc1_main.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/
> driver/cc1_main.cpp?rev=279035=279034=279035=diff
> 
> ==
> --- cfe/trunk/tools/driver/cc1_main.cpp (original)
> +++ cfe/trunk/tools/driver/cc1_main.cpp Thu Aug 18 01:43:07 2016
> @@ -25,7 +25,7 @@
>  #include "clang/Frontend/Utils.h"
>  #include "clang/FrontendTool/Utils.h"
>  #include "llvm/ADT/Statistic.h"
> -#include "llvm/Config/config.h"
> +#include "llvm/Config/llvm-config.h"
>  #include "llvm/LinkAllPasses.h"
>  #include "llvm/Option/ArgList.h"
>  #include "llvm/Option/OptTable.h"
>
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r279035 - [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

2016-08-18 Thread Vedant Kumar via cfe-commits
Author: vedantk
Date: Thu Aug 18 01:43:07 2016
New Revision: 279035

URL: http://llvm.org/viewvc/llvm-project?rev=279035=rev
Log:
[Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

llvm/Config/config.h has intentionally been excluded from llvm
installations (see: llvm/CMakeLists.txt). Un-break out-of-tree builds
post-r278882 by switching to llvm-config.h, which is exported.

Suggested by Will Dietz!

Modified:
cfe/trunk/tools/driver/cc1_main.cpp

Modified: cfe/trunk/tools/driver/cc1_main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=279035=279034=279035=diff
==
--- cfe/trunk/tools/driver/cc1_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1_main.cpp Thu Aug 18 01:43:07 2016
@@ -25,7 +25,7 @@
 #include "clang/Frontend/Utils.h"
 #include "clang/FrontendTool/Utils.h"
 #include "llvm/ADT/Statistic.h"
-#include "llvm/Config/config.h"
+#include "llvm/Config/llvm-config.h"
 #include "llvm/LinkAllPasses.h"
 #include "llvm/Option/ArgList.h"
 #include "llvm/Option/OptTable.h"


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