13 Commits

Author SHA1 Message Date
Michal Gorny
71b8698703 [llvm-config] Canonicalize CMake booleans to 0/1
Following the similar change to lit configuration, ensure that all CMake
booleans are canonicalized to 0/1 when being passed to llvm-config. This
fixes the incorrect interpretation of values when user passes another
value than the ON/OFF, and simplifies the code by removing unnecessary
string matching.

Furthermore, the code for --has-rtti and --has-global-isel has been
modified to print consistent values indepdently of the boolean used by
passed by the user to CMake. Sadly, the code already implicitly used
different values for the two (YES/NO for --has-rtti, ON/OFF for
--has-global-isel).

Include tests for all booleans and multi-value options in llvm-config.

Differential Revision: https://reviews.llvm.org/D28366

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291593 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 19:55:51 +00:00
Michal Gorny
4d3523945d [llvm-config] Print --system-libs only when static linking
Modify the --system-libs option in llvm-config to print system libs only
when using static linking. The system libraries are irrelevant when
linking to a shared library since the library has appropriate library
dependencies embedded.

Modify the --system-libs test appropriately to force static linking, and
disable it if static libs are not available (i.e. BUILD_SHARED_LIBS is
enabled).

Differential Revision: https://reviews.llvm.org/D27805

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291285 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06 21:33:54 +00:00
Chris Bieneman
741933d3a4 [llvm-config] Add --ignore-libllvm
This flag forces off linking libLLVM. This should resolve some issues reported on llvm-commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289605 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 22:17:59 +00:00
Chris Bieneman
7ca9e06428 [LIT] Fix system-windows
Turns out if you were on windows and your default target wasn't windows the system-windows feature wasn't getting enabled.

This fixes that and updates the coff-dwarf test to rely on the new "target-windows" feature. That test was the reason why system-windows was changed to not always be enabled on Windows hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 00:29:56 +00:00
Chris Bieneman
e190ac565f [llvm-config] Unsupported should be win32
Hopefully this will fix the failing Windows bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289497 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-12 23:42:08 +00:00
Chris Bieneman
8b658bc535 Revert "Disable all llvm-config tests for now, will investigate later"
This reverts commit r260386.

These tests all pass for me locally. I have no idea if they will pass on all configurations, so I'll watch the bots closely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-12 23:14:58 +00:00
Chris Bieneman
1c770ffdad [llvm-config] Fix cflags test looking for "error"
This test is (I think) actually trying to make sure no errors are printed, but it hits on the string "error" in flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289484 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-12 23:03:28 +00:00
Chris Bieneman
6dc865ced5 Revert "Remove system-libs.test for now"
This reverts commit r260281.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289483 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-12 23:03:01 +00:00
Ehsan Akhgari
e5aba2bcf6 Disable all llvm-config tests for now, will investigate later
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 17:29:50 +00:00
Ehsan Akhgari
f0f8b1c60d Remove system-libs.test for now
This test fails in the ninja-x64-msvc-RA-centos6 builder, so the
UNSUPPORTED: system-windows condition is insufficient.  Removing it
for now; I will investigate how this can be fixed later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 21:17:58 +00:00
Ehsan Akhgari
4f20943c31 Fix a test added in r260263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 21:10:22 +00:00
Ehsan Akhgari
5152245647 Fix a typo in r260263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 20:02:35 +00:00
Ehsan Akhgari
a20946b352 llvm-config: Add preliminary Windows support
Summary:
This patch adds Windows support for a few of the llvm-config commands,
including cflags, ldflags, libs, and system-libs.

Currently llvm-config is untested, so this patch adds tests for the
commands that it fixes as well.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16762

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 19:41:14 +00:00