1176 Commits

Author SHA1 Message Date
Zachary Turner
bfc7639dd1 Revert "Fix llvm-lit script generation in libcxx."
This reverts commit 4ad71811d45268d81b60f27e3b8b2bcbc23bd7b9.

There is a bot that is checking out libcxx and lit with nothing
else and then running lit.py against the test tree.  Since there's
no LLVM source tree, there's no LLVM CMake.  CMake actually
reports this as a warning saying unsupported libcxx configuration,
but I guess someone is depending on it anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-19 03:11:35 +00:00
Zachary Turner
a2144731b3 Fix llvm-lit script generation in libcxx.
Differential Revision: https://reviews.llvm.org/D37997

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313606 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-19 02:46:28 +00:00
Zachary Turner
5f445a03f7 [cmake] Add a simple function to dump all variables.
This is useful when debugging CMake problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313574 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-18 21:52:02 +00:00
Zachary Turner
4af1a22e52 Resubmit "Add a shared llvm.lit module that all test suites can use."
There were some issues surrounding Py2 / Py3 compatibility, but
I've now tested with both Py2 and Py3 and everything seems to
work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313467 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16 18:46:21 +00:00
Zachary Turner
591b934d84 Revert lit changes related to lit.llvm module.
It looks like this is going to be non-trivial to get working
in both Py2 and Py3, so for now I'm reverting until I have time
to fully test it under Python 3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313429 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16 00:52:49 +00:00
Zachary Turner
6368f9154b Resubmit "[lit] Add a lit.llvm module that all llvm projects can use"
This was reverted alongside the revert of the lit/llvm-lit refactor,
but now that that has re-landed, I'm relanding this as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313426 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16 00:25:58 +00:00
Zachary Turner
a0f1ea32df Resubmit "[lit] Force site configs to run before source-tree configs"
This is a resubmission of r313270.  It broke standalone builds of
compiler-rt because we were not correctly generating the llvm-lit
script in the standalone build directory.

The fixes incorporated here attempt to find llvm/utils/llvm-lit
from the source tree returned by llvm-config.  If present, it
will generate llvm-lit into the output directory.  Regardless,
the user can specify -DLLVM_EXTERNAL_LIT to point to a specific
lit.py on their file system.  This supports the use case of
someone installing lit via a package manager.  If it cannot find
a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or
invalid, then we print a warning that tests will not be able
to run.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313407 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15 22:10:46 +00:00
Zachary Turner
b411a75bae Revert "[lit] Force site configs to run before source-tree configs"
This patch is still breaking several multi-stage compiler-rt bots.
I already know what the fix is, but I want to get the bots green
for now and then try re-applying in the morning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313335 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15 02:56:40 +00:00
Reid Kleckner
f9c1d433fb [cmake] Fix a variable shadowing bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15 01:18:46 +00:00
Zachary Turner
3cdfdbb5e8 [lit] Revert "Add a lit.llvm module that all llvm projects can use"
This is breaking due to some changes I forgot to merge in, so I'm
temporarily reverting them until I can re-test that this works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313328 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15 00:56:08 +00:00
Zachary Turner
d5831d289e [lit] Add a lit.llvm module that all test suites can use.
To further reduce duplicate code, this patch introduces a module
that configs can simply import and get access to a lot of useful
functionality such as setting up paths, adding features that are
useful across all projects, and other utility-type functions.

For now this only updates llvm's suite to use this new library,
but subsequent patches will update other projects.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313325 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15 00:34:00 +00:00
Zachary Turner
837d04db84 [lit] Force site configs to be run before source-tree configs
This patch simplifies LLVM's lit infrastructure by enforcing an ordering
that a site config is always run before a source-tree config.

A significant amount of the complexity from lit config files arises from
the fact that inside of a source-tree config file, we don't yet know if
the site config has been run.  However it is *always* required to run
a site config first, because it passes various variables down through
CMake that the main config depends on.  As a result, every config
file has to do a bunch of magic to try to reverse-engineer the location
of the site config file if they detect (heuristically) that the site
config file has not yet been run.

This patch solves the problem by emitting a mapping from source tree
config file to binary tree site config file in llvm-lit.py. Then, during
discovery when we find a config file, we check to see if we have a
target mapping for it, and if so we use that instead.

This mechanism is generic enough that it does not affect external users
of lit. They will just not have a config mapping defined, and everything
will work as normal.

On the other hand, for us it allows us to make many simplifications:

* We are guaranteed that a site config will be executed first
* Inside of a main config, we no longer have to assume that attributes
  might not be present and use getattr everywhere.
* We no longer have to pass parameters such as --param llvm_site_config=<path>
  on the command line.
* It is future-proof, meaning you don't have to edit llvm-lit.in to add
  support for new projects.
* All of the duplicated logic of trying various fallback mechanisms of
  finding a site config from the main config are now gone.

One potentially noteworthy thing that was required to implement this
change is that whereas the ninja check targets previously used the first
method to spawn lit, they now use the second. In particular, you can no
longer run lit.py against the source tree while specifying the various
`foo_site_config=<path>` parameters.  Instead, you need to run
llvm-lit.py.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313270 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14 16:47:58 +00:00
Zachary Turner
a768fcb264 Revert "Determine up front which projects are enabled."
This was intended to be a generic CMake solution to a problem
shared across several projects.  It turns out it doesn't interact
very well certain CMake configurations, and furthermore the
"problem" is actually not a problem, as the problematic code
is never executed to begin with.  So this really isn't solving
anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313191 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13 20:49:25 +00:00
Zachary Turner
f733fd2a32 Determine up front which projects are enabled.
Some projects need to add conditional dependencies on other projects.
compiler-rt is already doing this, and I attempted to add this to
debuginfo-tests when I ran into the ordering problem, that you can't
conditionally add a dependency unless that dependency's CMakeLists.txt
has already been run (which would allow you to say if (TARGET foo).

The solution to this seems to be to determine very early on the entire
set of projects which is enabled. This is complicated by the fact that
there are multiple ways to enable projects, and different tree layouts
(e.g. mono-repo, out of -tree, external, etc). This patch attempts to
centralize all of this into one place, and then updates compiler-rt to
demonstrate as a proof of concept how this can simplify code.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313091 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-12 23:32:34 +00:00
MinSeong Kim
491dc19ec4 [CMake] Update GetSVN.cmake to handle repo
Summary:
When repo is used with git, 'clang --version' option does not display
the correct revision information (i.e. git hash on TOP) as the following:

clang version 6.0.0 --->
clang version 6.0.0 (clang version) (llvm version)

This is because repo also creates .git/svn folder as git-svn does and
this makes repo with git uses "git svn info" command, which is only for
git-svn, to retrieve its revision information, making null for the info.
To correctly distinguish between git-svn and repo with git, the folder
hierarchy to specify for git-svn should be .git/svn/refs as the "git svn
info" command depends on the revision data in .git/svn/refs. This patch
in turn makes repo with git passes through to the third macro,
get_source_info_git, in  get_source_info function, resulting in correctly
retrieving the revision information for repo with git using "git log ..."
command.

This patch is tested with git, svn, git-svn, and repo with git.

Reviewers: llvm-commits, probinson, rnk

Reviewed By: rnk

Subscribers: rnk, mehdi_amini, beanz, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312864 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 14:17:52 +00:00
Justin Bogner
16edf9bff8 Move some CLI utils out of llvm-isel-fuzzer and into the library
FuzzMutate might not be the best place for these, but it makes more
sense than an entirely new library for now. This will make setting up
fuzz targets with consistent CLI handling easier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312425 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-02 23:43:04 +00:00
Don Hinton
b74923ccea [CMAKE] Move version control macros to AddLLVM.cmake so they can be reused by clang, etc.
Summary:
Move version control macros, find_first_existing_file and
find_first_existing_vc_file to AddLLVM.cmake so they can be reused by sub projects
like clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312419 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-02 17:28:39 +00:00
Eugene Zemtsov
52a37ca13c Disable 64bit file position on old 32 bit Androids.
This is needed for building LLVM on Android with new NDK (newer
than r15c) and API level < 24. Android C library (Bionic) didn't have
support for 64 bit file position until Android N.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312389 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 23:12:43 +00:00
Justin Bogner
8cb6b3ebf8 llvm-isel-fuzzer: Make buildable and testable without libFuzzer
This adds a dummy main so we can build and run the llvm-isel-fuzzer
functionality when we aren't building LLVM with coverage. The approach
here should serve as a template to stop in-tree fuzzers from
bitrotting (See llvm.org/pr34314).

Note that I'll probably move most of the logic in DummyISelFuzzer's
`main` to a library so it's easy to reuse it in other fuzz targets,
but I'm planning on doing that in a follow up that also consolidates
argument handling in our LLVMFuzzerInitialize implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312338 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01 17:02:22 +00:00
Alex Lorenz
b7d233e973 Revert r312240
The buildbots have shown that -Wstrict-prototypes behaves differently in GCC
and Clang so we should keep it disabled until Clang follows GCC's behaviour


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312246 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 15:51:23 +00:00
Alex Lorenz
adeedb165c Build LLVM with -Wstrict-prototypes enabled
Clang 5 supports -Wstrict-prototypes. We should use it to catch any C
declarations that declare a non-prototype function.

rdar://33705313

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312240 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 13:23:24 +00:00
Justin Bogner
33a778823b cmake: Invent add_llvm_fuzzer to set up fuzzer targets
This moves the cmake configuration for fuzzers in LLVM to a new macro,
add_llvm_fuzzer. This will make it easier to keep things consistent
while implementing llvm.org/pr34314.

I've also made a couple of minor functional changes here:

- the fuzzers now use add_llvm_executable rather than add_llvm_tool.
  This means they won't create install targets and stuff like that,
  because those made little sense for these fuzzers.
- I've grouped these under "Fuzzers" rather than in with "Tools" for
  people who build with IDEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312200 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31 00:36:33 +00:00
Stephen Hines
cb99b8bba3 Enable building LLVMgold.dll under mingw.
Summary:
Plugins can (and should) be enabled under mingw if we are building
libLLVM.dll, so this is just a missed case. This allows LLVMgold.dll to
be built now under mingw.

Reviewers: llvm-commits, pirama, beanz, chapuni

Reviewed By: chapuni

Subscribers: chapuni, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311973 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29 02:07:28 +00:00
Juergen Ributzka
0e3a93628a Re-apply "Fix cmake check for futimens when deploying to earlier macOS releases."
This fixes an issue with the use of LLVM_PARALLEL_LINK_JOBS.

Original commit message:
macOS 10.13 added a new API (futimens). This API is only available on macOS 10.13
and later, but the cmake check we have in place only tests if the symbol is
present and ignores the availability attribute. Luckily we have new warning for
this and by making this warning an error the cmake check will return the correct
result.

See also rdar://problem/33992750.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311965 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29 00:34:56 +00:00
Juergen Ributzka
5f69ca899a Revert "Fix cmake check for futimens when deploying to earlier macOS releases."
This reverts r311949. The ARM bots don't like it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311953 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-28 23:24:03 +00:00
Juergen Ributzka
cf4d263198 Fix cmake check for futimens when deploying to earlier macOS releases.
macOS 10.13 added a new API (futimens). This API is only available on macOS 10.13
and later, but the cmake check we have in place only tests if the symbol is
present and ignores the availability attribute. Luckily we have new warning for
this and by making this warning an error the cmake check will return the correct
result.

See also rdar://problem/33992750.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311949 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-28 23:04:38 +00:00
George Karpenkov
91e5590653 Update LLVM fuzzers to use the libFuzzer bundled with the compiler toolchain
Differential Revision: https://reviews.llvm.org/D37041

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311515 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-23 00:40:58 +00:00
Oleg Ranevskyy
fc65759fdf [CMake][LLVM] Remove duplicated library mask. Broken clang linking against clangShared
Summary:
The `LLVM${c}Info` mask is listed twice in LLVM-Config.cmake. This results in the libraries such as LLVMARMInfo, LLVMAArch4Info, etc appearing twice in `extract_symbols.py` command line while building `clangShared`. `Extract_symbols.py` does not work well in such a case and completely ignores the symbols from the duplicated libraries. Thus, the LLVM(...)Info symbols do not get exported from `clangShared` and linking clang against it fails with unresolved dependencies.

Seems to be a mere copy-paste mistake.

Reviewers: beanz, chapuni

Reviewed By: chapuni

Subscribers: chapuni, aemerson, mgorny, kristof.beyls, llvm-commits, asl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310590 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-10 13:37:58 +00:00
Michal Gorny
a405cd45b7 [OCaml] Pass -D/-UNDEBUG through to ocamlc
Detect [/-][DU]NDEBUG in CMAKE_C_FLAGS* and pass them through to ocamlc.
This is necessary because their value might affect visibility of dump
functions in LLVM and ocamlc uses its own compiler and flags by default.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309483 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 08:10:24 +00:00
Michal Gorny
f2e6bc5c83 [OCaml] Install dynamic libraries in 'stubdirs' directory
Install the OCaml dynamic libraries in the 'stubdirs' directory rather
than the llvm subdirectory in order to fix running executables created
by ocamlc. Otherwise, the executables fail to run being unable to locate
the libraries (unless the LLVM directory is explicitly added to
LD_LIBRARY_PATH).

The staging directories are not altered since they work for our
development setup anyway, and installing into two directories would
unnecessarily make the code more complex.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309481 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-29 06:46:45 +00:00
Chris Bieneman
a676448894 [CMake] NFC. Add intrinsics_gen target to CMake Exports
By creating a dummy of this target in LLVMConfig.cmake, projects that can build against out-of-tree LLVM can freely depend on the target without needing to have conditionals for if LLVM is in-tree or out-of-tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309389 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 15:33:35 +00:00
Michal Gorny
b85036296d Revert rL309320 - "[OCaml] Respect CMAKE_C_FLAGS for OCaml C files"
This causes buildbot breakage for systems where OCaml files are built
with a different compiler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309364 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28 04:29:20 +00:00
Michal Gorny
d62ee98c27 [OCaml] Respect CMAKE_C_FLAGS for OCaml C files
Pass the values of CMAKE_C_FLAGS and CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}
as -ccopt to ocamlc. This enforces the specific flags used for the LLVM
build to be used for OCaml bindings as well, notably -O and -march
flags.

This also solves the issue of the user being unable to force specific
flags for OCaml bindings builds. Gentoo needs this to enforce -DNDEBUG
consistently between the LLVM build and the split OCaml bindings build.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309320 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 21:13:19 +00:00
Eric Beckmann
261decae63 Remove check for i686.
libxml2 is supported for 32 bit, so our build system should be checking
the target rather than native os when choosing shared libs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309242 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-27 01:16:19 +00:00
Petr Hosek
82d2d7a379 [CMake] Disable -Werror for CMake checks
-Werror may cause some of the CMake checks to fail, so we disable
it even if it's enabled for the build itself.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309235 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 23:49:18 +00:00
Eric Beckmann
4e19ea6aa7 Close if statement in config-ix.cmake while checking for i686 arch.
Reapply "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"

This reverts commit e7400d7cbc2b7539de3aa7a20adc8f4ee0cb7bef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309181 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 21:20:24 +00:00
Eric Beckmann
ea5f088f78 Revert "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"
This reverts commit 38a6db6397364ee91b04afea2cdcb1b5b4d252bf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309179 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 21:11:07 +00:00
Eric Beckmann
0fefa6bd86 Set a different var for checking I686, because LLVM_NATIVE_ARCH is
overwritten.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309177 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 21:03:55 +00:00
Eric Beckmann
c20c1ef743 Disable libxml on i686, because it is a 32 bit architecture and
libxml2.so is for 64 bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309169 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26 20:22:26 +00:00
Chris Bieneman
35647a1478 [CMake] Fix broken builds from r309029
Fixing the mismatched beginning if and endif contents.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309030 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 20:58:14 +00:00
Chris Bieneman
02829e6c9c [CMake] Allow TableGen.cmake to be included multiple times
This patch allows TableGen.cmake to be safely included multiple times in sub-projects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309029 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25 20:53:31 +00:00
Erich Keane
cc55cc2451 Remove Bitrig: LLVM Changes
Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308799 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-21 22:48:47 +00:00
Eric Beckmann
d761f4904e Only use xml if iconv is found, which is a prerequisite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308711 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-21 02:13:02 +00:00
Eric Beckmann
d7e9689d4c Explicitly disable libxml2 on android.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308699 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20 23:54:51 +00:00
George Karpenkov
7f5a7a443d Generate a compile_commands.json DB for external projects.
compile_commands.json file is very useful both for tooling and for
reproducible builds.
For files generated from recursive CMake invocation this information was
not previously generated.

Differential Review: https://reviews.llvm.org/D35219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308698 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20 23:46:46 +00:00
Eric Beckmann
2345ccfb6c Only enable libxml2 on linux, because systems like android lack libiconv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308689 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20 23:02:49 +00:00
Eric Beckmann
c1527448ed Implement parsing and writing of a single xml manifest file.
Summary: Implement parsing and writing of a single xml manifest file.

Subscribers: mgorny, llvm-commits, hiraditya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308679 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20 21:42:04 +00:00
Brian Gesiak
0e8fd92a72 [cmake] GetSVN.cmake takes a list of arguments
Summary:
GetSVN.cmake currently takes one or two pairs of <source directory path,
name>, then attempts to get the remote repository URL and source control
revision of the repositories at those one or two paths.

It takes two pairs in order for Clang to get the revision of both
itself, and its dependency LLVM.

For projects that rely upon both LLVM and Clang (Apple's Swift is one
example, but there are others), GetSVN.cmake is used to fetch *three*
revisions: Swift, Clang, and LLVM.

To support this use case, change GetSVN.cmake: instead of taking one or
two pairs (specified via `FIRST_SOURCE_DIR`/`FIRST_NAME`, have it take a list
of pairs (`SOURCE_DIRS`/`NAMES`).

In order to allow Clang to migrate, have GetSVN.cmake support both sets
of arguments for now. The old arguments can be removed once Clang begins
using the new arguments, and Swift can follow when it updates its
copy of LLVM.

Test Plan:
1. Perform a clean build of Clang, verify that `clang --version` still
   prints the correct LLVM and Clang revision information.
2. Modify Clang's CMake to use the new arguments, then perform another
   clean build. `clang --version` should still print the correct
   revision information.

Reviewers: jordan_rose, beanz, probinson

Subscribers: echristo, chapuni, llvm-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308507 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-19 18:37:02 +00:00
Rui Ueyama
86784318a6 [Solaris] Detect Solaris LD, use detection results to pass Solaris-ld options
Solaris ld is not the only linker available on Solaris.
Introducing linker detection and using LLVM_LINKER_IS_SOLARISLD to
select Solaris-ld specific handling.

Patch by: Fedor Sergeev

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307852 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:43:14 +00:00
Rui Ueyama
f4634bee7b Use --color-diagnostics instead of -color-diagnostics.
Solaris ld interprets -color-diagnostics as a -c option, so it is
better to use --color-diagnostics instead. lld accepts both.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307850 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12 21:37:02 +00:00