1249 Commits

Author SHA1 Message Date
Shoaib Meenai
e146da5dff [cmake] Pass external project source directories to sub-configures
We're passing LLVM_EXTERNAL_PROJECTS to cross-compilation configures, so
we also need to pass the source directories of those projects, otherwise
configuration can fail from not finding them.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375157 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-17 19:24:58 +00:00
Michal Gorny
ab916900b9 [llvm] [ocaml] Support linking against dylib
Support linking OCaml modules against LLVM dylib when requested,
rather than against static libs that might not be installed at all.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374556 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-11 14:32:43 +00:00
Nico Weber
091533bd66 Reland r349624: Let TableGen write output only if it changed, instead of doing so in cmake
Move the write-if-changed logic behind a flag and don't pass it
with the MSVC generator. msbuild doesn't have a restat optimization,
so not doing write-if-change there doesn't have a cost, and it
should fix whatever causes PR43385.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373664 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-03 21:22:28 +00:00
Michal Gorny
d40d55b3f4 [llvm] [cmake] Add install targets for missing distribution components
Add install targets as necessary to include all files normally installed
in LLVM_DISTRIBUTION_COMPONENTS.  This includes targets for Sphinx docs,
opt-viewer Python modules and TableGens.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373482 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-02 16:06:50 +00:00
Simon Pilgrim
23fe803d5a Revert rL349624 : Let TableGen write output only if it changed, instead of doing so in cmake, attempt 2
Differential Revision: https://reviews.llvm.org/D55842
-----------------
As discussed on PR43385 this is causing Visual Studio msbuilds to perpetually rebuild all tablegen generated files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373338 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-01 13:39:43 +00:00
Saleem Abdulrasool
e9915e833b build: serialise LLVM_ENABLE_UNWIND_TABLES into LLVMConfig
Serialize the value of the configuration option into the configuration so that
builds which integrate LLVM can identify the value of the flag that was used to
build the libraries.  This is intended to be used by Swift to control tests
which rely on the unwind information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373253 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-30 20:03:59 +00:00
Justin Bogner
f1fe725679 Use double quotes for LDFLAGS in -DLLVM_BUILD_INSTRUMENTED_COVERAGE
Mimics the changes in r372209 to handle the change of quotes in
r372226. Probably isn't sufficient for windows, but unbreaks the cmake
flag at least.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372791 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-24 23:56:22 +00:00
Simon Pilgrim
8652b3b5f5 [llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library
Modify LLVMConfig to produce LLVM_USE_CRT variables in build-directory. It helps to set the same compiler debug options like in builded library.

Committed on behalf of @igorban (Igor)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372610 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 14:11:48 +00:00
Russell Gallop
527096752d [cmake] Changes to get Windows self-host working with PGO
Fixes quoting of profile arguments to work on Windows
Suppresses adding profile arguments to linker flags when using lld-link
Avoids -fprofile-instr-use being added to rc.exe flags
Removes duplicated adding of -fprofile-instr-use to linker flags (since
r355541)
Move handling LLVM_PROFDATA_FILE to HandleLLVMOptions.cmake

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372209 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-18 09:43:13 +00:00
David Zarzycki
82b62b61b6 [CMake] Don't pass all LLVM_COMPILE_FLAGS to the C compiler
GCC (unlike clang!) warns about C++ flags when compiling C.

https://reviews.llvm.org/D67171

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371521 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:19:52 +00:00
David Zarzycki
04e7659937 [CMake] LLVM_COMPILE_FLAGS also applies to C files
LLVM_COMPILE_FLAGS also applies to C files, otherwise tuning flags,
etc. won't be picked up.

https://reviews.llvm.org/D67171

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371173 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-06 07:12:36 +00:00
Simon Pilgrim
2f7e413a34 [cmake] Remove MSVC C4180 override
Tested on VS2017 and VS2019 llvm/clang builds with WX enabled - its no longer necessary to disable this warning.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370871 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 10:26:39 +00:00
Simon Pilgrim
95f6d02cc9 [cmake] Remove MSVC C4258 override
Tested on VS2017 and VS2019 llvm/clang builds with WX enabled - its no longer necessary to disable this warning.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370866 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 10:01:31 +00:00
Simon Pilgrim
db4d246e77 [cmake] Improve comment describing the C4245 warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370772 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-03 16:11:37 +00:00
Jonas Devlieghere
287c177143 [lit] Only set DYLD_LIBRARY_PATH for shared builds
In r370135 I committed a temporary workaround for the sanitized bot to
not set (DY)LD_LIBRARY_PATH when (DY)LD_INSERT_LIBRARIES was set.
Setting (DY)LD_LIBRARY_PATH is only necessary for (standalone)
shared-library builds, so a better solution is to only set the
environment variable when necessary.

Differential revision: https://reviews.llvm.org/D67012

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370549 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 23:16:02 +00:00
Simon Pilgrim
301861b358 [CMake] Update C4324 MSVC warning comment to explain its still broken at VS2019
As promised, I've updated the comment for the C4324 MSVC warning that was re-disabled at rL367409 / rG8f823e63e3edf87ab029ba32b68f3eb5d2f392b5 to put it in terms of currently supported VS versions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369368 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 11:20:05 +00:00
Hubert Tong
e6f17d4de6 [cmake] Move blocks out of redundant else( MSVC ); NFC
Address post-commit comment on D66256 regarding the `else( MSVC )` block
containing only blocks guarded with `LLVM_COMPILER_IS_GCC_COMPATIBLE`,
which would imply `NOT MSVC`.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369221 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-18 22:02:24 +00:00
Hubert Tong
a796afd098 [AIX] For XL, pick GCC-compatible std & default warning options
Summary:
LLVM now requires C++14. For IBM XL compilers with C++14 support, this
can be done with the GCC-style options. The relevant block in the CMake
file is split up into smaller parts as part of this patch to allow the
common cases to be shared.

Reviewers: jfb, jasonliu, daltenty, xingxue

Reviewed By: jfb, xingxue

Subscribers: mstorsjo, mgorny, dexonsmith, llvm-commits

Tags: #llvm

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369058 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-15 22:23:53 +00:00
Justin Bogner
b552dbc836 [cmake] install_symlink should obey DESTDIR unconditionally
Setting DESTDIR was erroneously buried under a condition here - if
it's set it should always be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369011 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-15 15:36:13 +00:00
Erich Keane
89ae907520 Add support in CMake to statically link the C++ standard library.
It is sometimes useful to have the C++ standard library linked into the
assembly when compiling clang, particularly when distributing a compiler
onto systems that don't have a copy of stdlibc++ or libc++ installed.

This functionality should work with either GCC or Clang as the host
compiler, though statically linking libc++ (as may be required for
licensing purposes) is only possible if the host compiler is Clang with
a copy of libc++ available.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368907 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 19:55:59 +00:00
Chris Bieneman
874a0a3b9d [CMake] Fix cache invalidation of LLVM_CXX_STD
This cleans up fallout from https://reviews.llvm.org/D66195.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368897 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 18:26:37 +00:00
JF Bastien
0b086ac8bd Match if / elseif properly
My last commit fumbled it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368892 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 18:01:11 +00:00
JF Bastien
29da3ad1ea Remove now useless C++1y flag
As of D66195 we support C++14 by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368890 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 17:57:20 +00:00
JF Bastien
f72d1f1ac3 Move to C++14
Summary:
I just bumped the minimum compiler versions to support C++14 in D66188.

Following [our process](http://llvm.org/docs/DeveloperPolicy.html#toolchain) and [our previous agreement](http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html), I'm now officially bumping the C++ version to 14 and updating the documentation.

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, chandlerc, thakis, EricWF, jyknight, lhames, JDevlieghere

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368887 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 17:39:07 +00:00
JF Bastien
b0c1ea2708 Remove minimum toolchain soft-error
Summary:
Back in January I changed the minimum toolchain version required to build clang
and LLVM: D57264. Since then we've release LLVM 8, following
[our process](http://llvm.org/docs/DeveloperPolicy.html#toolchain)
it's therefore now a good time to remove the soft-error and officially deprecate
older toolchains. I tried this out last Tursday night to see if any bots
complained, and I saw no complaints. I also manually audited bots and didn't see
any bot that should break, but their toolchain information is unreliable and
some bots are offline.

Once this patch stick we'll move to C++14 as we've
[already agreed](http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html).

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, EricWF, thakis, chandlerc

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368799 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 04:30:51 +00:00
Haibo Huang
7b065ec3a1 Fix rpath for MacOS/iOS
Summary: libs can be installed to ../lib64.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368398 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-09 06:05:32 +00:00
JF Bastien
0e8f832a11 Revert "Temporarily bump minimum compiler version"
It's been in for more than 30 min and no bots have complained. Let's see if some
slow ones catch up. I'll do another manual pass on bots later (in case some that
were down are back up), and then turn this on permanently through a regular
review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368253 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-08 05:47:59 +00:00
JF Bastien
78669a66e3 Temporarily bump minimum compiler version
It's pretty hard to find a reliable list of which bots use which compiler version... so I'm going to commit this change which allows us to mandate the compilers required for C++14. This bump is what we've already agreed to do, so I'll use the list of failures to figure out which bots need to bump their compiler version. I'll revert the change in a few minutes.

The last discussion of this is here: http://lists.llvm.org/pipermail/llvm-dev/2019-August/134360.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368252 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-08 05:12:20 +00:00
Galina Kistanova
942df4805e Append an executable suffix to the toolchain tool paths on Windows platform.
Append a default CMake suffix (CMAKE_EXECUTABLE_SUFFIX) for the build host to the toolchain tool path when adding a LLVM external project.
The tool binary files should contain .exe suffix to run them properly on Windows platform when building the projects.

Patch by Vlad Vereschaka.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368121 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-07 03:19:40 +00:00
Chris Bieneman
8ac2513e9b Add order-dependencies to object libraries
Summary: If you are generating an object library that depends on table-gen generate sources, you need the object library to depend on the tablgen target. Currently llvm_add_library doesn't add dependencies for object libraries at all, which is clearly problematic.

Reviewers: compnerd, hintonda, smeenai

Reviewed By: smeenai

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368074 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-06 19:41:23 +00:00
Hubert Tong
1277fa00ed [CMake] Add mapping for IBM XL -qnoeh and -qnortti
Summary:
This patch maps in the `-qnoeh` and `-qnortti` options for building with
IBM XL compilers.

Reviewers: daltenty, xingxue, jasonliu

Reviewed By: daltenty

Subscribers: mgorny, llvm-commits

Tags: #llvm

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368050 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-06 15:08:13 +00:00
Chris Bieneman
0a79c1cc12 NFC. Documenting Native tablegen dependency
Adding documentation explaining why this dependency is required and should not be removed again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367896 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 18:00:55 +00:00
Chris Bieneman
a47d3f0b96 NATIVE tablegen needs to depend on target tablegen
This dependency was removed in  r357486, which has lead to a stream of difficult to diagnose bugs.

Without this dependency, when building with `LLVM_OPTIMIZED_TABLEGEN=On` the native tablegen executible may not be rebuilt at all, and often won't get rebuilt before targets that use the tablegen headers. In the best case this results in a build-time failure, in the worst case it results in runtime failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367895 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 17:50:08 +00:00
Simon Pilgrim
a405db4294 Re-disable C4324 MSVC warning that was enabled in D65458 / rL367383
This was breaking /WX builds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367409 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-31 11:06:05 +00:00
JF Bastien
eb521fd586 [NFC] Remove LLVM_ALIGNAS
Summary: The minimum compilers support all have alignas, and we don't use LLVM_ALIGNAS anywhere anymore. This also removes an MSVC diagnostic which, according to the comment above, isn't relevant anymore.

Reviewers: rnk

Subscribers: mgorny, jkorous, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367383 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-31 03:22:08 +00:00
Reid Kleckner
2f158d66cf Remove cmake checks for MSVC 1900 / VS 2013
Our minimum Visual C++ version is 19.10 from Visual Studio 2017.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367362 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 22:49:11 +00:00
JF Bastien
ebe4432be3 [NFC] Improve cmake diagnostic when checking atomics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367359 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 22:08:38 +00:00
Rainer Orth
e940c27f02 [CMake] Add -z defs on Solaris
Like other ELF targets, shared objects should be linked with -z defs on Solaris.

Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366821 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-23 16:27:34 +00:00
Daniel Sanders
2636226375 Re-commit: r366610 and r366612: Expand pseudo-components before embedding in llvm-config
There were two main problems:
* The 'nativecodegen' pseudo-component was unconditionally adding
  ${native_tgt}CodeGen even though it conditionally added ${native_tgt}Info and
  ${native_tgt}Desc. This has been fixed by making ${native_tgt}CodeGen
  conditional too
* The 'all' pseudo-component was causing library names like LLVMLLVMDemangle as
  the expansion was to a library name and not a component. There doesn't seem to
  be a list of available components anywhere so this has been fixed by moving the
  expansion of 'all' back where it was before. This manifested in different ways
  on different builders but it was the same root cause



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366622 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 22:46:47 +00:00
Daniel Sanders
9d2e13dadb Revert r366610 and r366612: Expand pseudo-components before embedding in llvm-config
Some targets are missing LLVMDemangle, one is adding the LLVM prefix twice, and two
are hitting the very error this patch fixes for my target. Reverting while I work
through the reports.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366615 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 21:11:05 +00:00
Daniel Sanders
a962145e3d Fix a latent bug discovered by r366610: nativecodegen includes X86CodeGen when X86 is not compiled
I believe this to have been a latent bug as the same expansion checks for the
existence of ${native_tgt}Info and ${native_tgt}Desc and only adds them if
they were compiled but unconditionally adds ${native_tgt}CodeGen.

This should fix llvm-clang-x86_64-win-fast which builds ARM only on an X86 host and similar builders.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366612 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 20:58:11 +00:00
Daniel Sanders
a0786e1ec5 Expand pseudo-components before embedding in llvm-config
Summary:
If you use pseudo-targets like AllTargetsCodeGens in LLVM_DYLIB_COMPONENTS
then a test will fail because `./bin/llvm-config --shared-mode` can't
handle these targets. We can fix this by expanding them before embedding
the string into llvm-config

Reviewers: bogner

Reviewed By: bogner

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366610 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 20:38:05 +00:00
Nathan Lanza
474ca495a9 [cmake] Fix typo where a varible was checked for Apple instead of Darwin
Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366515 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 00:20:58 +00:00
Nathan Lanza
0687ba8500 [cmake] Convert the NATIVE llvm build process to be project agnostic
lldb recently added a tablegen tool. In order to properly cross compile
lldb standalone there needs to be a mechanism to generate the native
lldb build, analgous to what's done for the NATIVE llvm build. Thus,
we can simply modify this setup to allow for any project to be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366514 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 00:10:06 +00:00
Nathan Lanza
33279947e1 [cmake] Only run llvm-codesign if targetting apple on an apple host
Summary:
Other platforms don't have the capability to perform llvm_codesign
step. If LLVM_CODESIGNING_IDENTITY is set then this chunk of code would
attempt to codesign if the target was Apple. But when cross compiling
to Darwin from Linux, for example, this step would fail. So test if the
host is Apple as well.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366498 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-18 21:14:26 +00:00
Keno Fischer
1dae562690 [cmake] Don't set install rules for tblgen if building utils is disabled
Summary:
This is a follow up to D64032. Afterwards if building utils is disabled
and cross compilation is attempted, CMake will complain that adding
`install()` directives to targets with EXCLUDE_FROM_ALL set is "undefined".
Indeed, it appears depending on the CMake version and the selected
Generator, the install rule will error because the underlying target isn't
built. Fix that by not adding the install rule if building utils is not
requested. Note that this doesn't prevent building tblgen as a
dependency in not cross-build, even if building tools is disabled.

Reviewed By: smeenai
Differential Revision: https://reviews.llvm.org/D64225

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366108 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-15 19:04:04 +00:00
Tom Stellard
712477f346 cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros
Summary:
This will simplify the macros by allowing us to remove the hard-coded
list of libraries that should be installed when
LLVM_INSTALL_TOOLCHAIN_ONLY is enabled.

Reviewers: beanz, smeenai

Reviewed By: beanz

Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365902 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 14:40:18 +00:00
Simon Pilgrim
2c0337f5df Retire VS2015 Support
As proposed here: https://lists.llvm.org/pipermail/llvm-dev/2019-June/133147.html

This patch raises the minimum supported version to build LLVM/Clang to Visual Studio 2017.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365452 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-09 10:10:48 +00:00
Chris Bieneman
b513268c38 Fix issues building libraries as more than one type with Xcode
Summary:
CMake+Xcode doesn't seem to handle targets that only have object
sources. This patch works around that limitation by adding a dummy
soruce file to any library target that is generated by llvm_add_library
when object libraries are generated.

Object libraries are generated whenever llvm_add_library is passed more
than one library type, which is now the default case for clang static
libraries (which generate STATIC and OBJECT libraries).

Reviewers: zturner, compnerd, joanlluch

Reviewed By: joanlluch

Subscribers: joanlluch, xbolva00, mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365365 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-08 18:29:29 +00:00
Keno Fischer
371c5dc60c [cmake] With utils disabled, don't build tblgen in cross mode
Summary:
In cross mode, we build a separate NATIVE tblgen that runs on the
host and is used during the build. Separately, we have a flag that
disables building all executables in utils/. Of course generally,
this doesn't turn off tblgen, since we need that during the build.
In cross mode, however, that tblegen is useless since we never
actually use it. Furthermore, it can be actively problematic if the
cross toolchain doesn't like building executables for whatever reason.
And even if building executables works fine, we can at least save
compile time by omitting it from the target build. There's two changes
needed to make this happen:
- Stop creating a dependency from the native tool to the target tool.
  No such dependency is required for a correct build, so I'm not entirely
  sure why it was there in the first place.
- If utils were disabled on the CMake command line and we're in cross mode,
  respect that by excluding it from the install target (using EXCLUDE_FROM_ALL).

Reviewers: smeenai
Differential Revision: https://reviews.llvm.org/D64032

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364872 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-01 23:15:07 +00:00