1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

150 Commits

Author SHA1 Message Date
Nico Weber
86a0198c8d gn build: Build clang with -fno-strict-aliasing, make building with gcc much quieter
- gcc doesn't understand -Wstring-conversion, so pass that only to clang
- disable a few gcc warnings that are noisy and also disabled in the cmake build
- -Wstrict-aliasing pointed out that the cmake build builds clang with
  -fno-strict-aliasing, so do that too

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

llvm-svn: 352141
2019-01-25 00:29:17 +00:00
Nico Weber
69ded40d03 gn build: Merge r351990
llvm-svn: 352096
2019-01-24 20:19:18 +00:00
Nico Weber
a5aba5c47a gn build: Merge r351320 (the 9.0.0 version bump)
llvm-svn: 352002
2019-01-24 01:00:52 +00:00
Peter Collingbourne
aa6dcf0b5b gn build: Merge r351820.
llvm-svn: 351919
2019-01-23 02:19:56 +00:00
Nico Weber
08e216f48b gn build: Merge r351880
llvm-svn: 351918
2019-01-23 02:10:10 +00:00
Nico Weber
5321e96990 gn build: Stop passing -DLLVM_LIBXML2_ENABLED to some targets
This is a remnant from before the gn build had a working config.h.

Defining LLVM_LIBXML2_ENABLED only for targets that depend on build/libs/xml is
nice in that only some of the codebase needs to be rebuilt when
llvm_enable_libxml2 changes -- but config.h already defines it and defining it
there and then redundantly a second time for some targets is worse than having
it just in config.h.

No behavior change.

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

llvm-svn: 351758
2019-01-21 18:59:11 +00:00
Nico Weber
6295f7103b gn build: Merge r351627, r351548, r351701
llvm-svn: 351757
2019-01-21 18:56:39 +00:00
Nico Weber
fa15d4bb37 Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [llvm]
r291284 added a nice mechanism to consistently pass CMake on/off toggles to
lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around
the same time and doesn't use the new system yet).

Also alphabetically sort the list passed to llvm_canonicalize_cmake_booleans()
in llvm/test/CMakeLists.txt.

No intended behavior change.

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

llvm-svn: 351615
2019-01-19 00:10:54 +00:00
Nico Weber
667cf61859 gn build: unbreak mac (and maybe win) after r351258, r351277
The check-hwasan build files assert that current_os == "linux" || current_os ==
"android", so pull it in only there.

ar is unused on mac, so don't set it in the stage2 toolchain. (It'd be nicer to
use llvm-libtool on mac instead of host libtool, but llvm-libtool doesn't seem
to understand the -no_warning_for_no_symbols flag.)

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

llvm-svn: 351519
2019-01-18 04:09:30 +00:00
Nico Weber
0c94c23e35 gn build: Merge r351499
llvm-svn: 351516
2019-01-18 03:38:53 +00:00
Nico Weber
9264894fc9 mac: Correctly disable tools/lto tests when building with LLVM_ENABLE_PIC=OFF
llvm/tools sets LLVM_TOOL_LTO_BUILD to Off if LLVM_ENABLE_PIC=OFF, but that's
not visible in llvm/test.

r289662 added the llvm_tool_lto_build lit parameter, there the intent was to
use it with an explicit -DLLVM_TOOL_LTO_BUILD=OFF, which is visible globally.
On the review for that (D27739), a mild preference was expressed for using a
lit parameter over checking the existence of libLTO.dylib. Since that works
with the LLVM_ENABLE_PIC=OFF case too and since it matches what we do for the
gold plugin, switch to that approach.

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

llvm-svn: 351515
2019-01-18 03:36:04 +00:00
Nico Weber
a32a50a832 llvm build: Merge r351448
llvm-svn: 351469
2019-01-17 20:20:56 +00:00
Peter Collingbourne
0e57b6e44c gn build: Add headers to compiler-rt build files.
Also fix sort order in llvm/lib/CodeGen/GlobalISel/BUILD.gn.

llvm-svn: 351367
2019-01-16 18:45:12 +00:00
Peter Collingbourne
f67bc623d8 gn build: Merge r351283.
llvm-svn: 351293
2019-01-16 02:27:12 +00:00
Peter Collingbourne
e58561f877 gn build: Add check-hwasan target.
The Android sanitizer tests are currently some of the most difficult
to run correctly, requiring at least 3 build directories which have
to be configured in just the right way and built in the correct order
(see e.g. [1] and the functions that it calls).

This patch adds a check-hwasan target which greatly simplifies running
the hwasan tests for gn users, taking advantage of its support for
multiple toolchains. With this the tests can be run simply by setting
an NDK path and running "ninja check-hwasan" with a compatible Android
device connected. The Linux/x86_64 and Android/aarch64 targets are
tested in parallel.

[1] https://github.com/llvm/llvm-zorg/blob/master/zorg/buildbot/builders/sanitizers/buildbot_android.sh

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

llvm-svn: 351277
2019-01-16 00:15:25 +00:00
Peter Collingbourne
c6dd831c47 gn build: Add a stage2 host toolchain and make the hwasan runtime buildable on x86_64 Linux.
Differential Revision: https://reviews.llvm.org/D56711

llvm-svn: 351258
2019-01-15 22:02:12 +00:00
Peter Collingbourne
087cc9fbff gn build: Add a resource_dir.gni file.
The path to the resource directory will end up being used in several
more places once the support for running check-hwasan lands. This
moves the definition to a central location so that it can be used
from those places.

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

llvm-svn: 351255
2019-01-15 21:44:59 +00:00
Peter Collingbourne
5788f38076 gn build: Move target flags from toolchain to a .gni file.
While here, add a use_lld flag and default it to true when using
clang on non-mac.

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

llvm-svn: 351248
2019-01-15 21:24:00 +00:00
Peter Collingbourne
e504dae9e1 gn build: Add build files for compiler-rt/lib/{hwasan,interception,sanitizer_common,ubsan}.
This allows the hwasan runtime to be built for Android aarch64.

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

llvm-svn: 351246
2019-01-15 21:08:21 +00:00
Peter Collingbourne
de7b481ed5 gn build: Merge r351216, r351228.
llvm-svn: 351242
2019-01-15 21:02:49 +00:00
Craig Topper
9f55f29946 [Nios2] Remove Nios2 backend
As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months.

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

llvm-svn: 351231
2019-01-15 19:59:19 +00:00
Hans Wennborg
28ed037d55 gn build: Don't assume valgrind.h exists on Linux
It didn't on my machine, so defaulting it to off seems better.

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

llvm-svn: 351202
2019-01-15 16:51:45 +00:00
Peter Collingbourne
dced64438d gn build: Rename llvm_host_triple to llvm_current_triple and have it use current_{cpu,os}.
This makes e.g. ToolChain::isCrossCompiling() in
clang/lib/Driver/ToolChain.cpp return the correct result
if the compiler was cross-compiled. This change also affects
llvm_default_target_triple, so cross-compiled compilers default to
targeting the cross-compilation target, which makes more sense than
the host that the compiler was compiled on.

This change will also be necessary in order for the correct triples
to appear in generated lit files for non-native targets.

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

llvm-svn: 351168
2019-01-15 08:20:29 +00:00
Peter Collingbourne
fd5e7692d9 gn build: Make a couple of improvements to the unix toolchain.
Add an asm tool (will be required for building sanitizer_common on
x64) and set a soname for DSOs so that anything that links against
them gets the correct DT_NEEDED.

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

llvm-svn: 351167
2019-01-15 08:14:38 +00:00
Peter Collingbourne
7f9dca5ace gn build: Switch to using current_os in lib/Support/BUILD.gn.
Differential Revision: https://reviews.llvm.org/D56704

llvm-svn: 351166
2019-01-15 07:17:03 +00:00
Peter Collingbourne
89ce163305 gn build: Split no-RTTI flag into a config.
Some of the sanitizer runtime code needs to be built with RTTI;
this allows that code to opt in to RTTI.

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

llvm-svn: 351155
2019-01-15 02:43:33 +00:00
Peter Collingbourne
3309a3ab97 gn build: Stop defining LLVM_ON_UNIX globally.
This macro is already being defined in llvm-config.h.

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

llvm-svn: 351154
2019-01-15 02:42:47 +00:00
Nico Weber
836b276e53 gn build: Unbreak mac build after r350977
llvm-svn: 351090
2019-01-14 18:30:35 +00:00
Nico Weber
8a58e6a620 gn build: Fix path to gn.py in docs
llvm-svn: 351088
2019-01-14 18:26:55 +00:00
Nico Weber
882a1fa563 gn build: svn propset svn:executable on utils/gn/gn.py
llvm-svn: 351085
2019-01-14 18:24:44 +00:00
Nico Weber
c11843323d gn build: Add gn.py wrapper script that adds --dotfile= and --root= parameters
Since people weren't enthused about moving the .gn file to the toplevel in
D56419, here's a script to make gn at least somewhat more pleasant to invoke
(useful for gn clean, gn args --list, gn desc, etc).

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

llvm-svn: 351064
2019-01-14 12:50:40 +00:00
James Y Knight
c73d346797 Remove TypeBuilder.h, and fix the few locations using it.
This shortcut mechanism for creating types was added 10 years ago, but
has seen almost no uptake since then, neither internally nor in
external projects.

The very small number of characters saved by using it does not seem
worth the mental overhead of an additional type-creation API, so,
delete it.

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

llvm-svn: 351020
2019-01-13 16:09:28 +00:00
Nico Weber
f1fb3280a5 gn build: Unbreak Windows build
I didn't break all that much during upstreaming, just needs two small fixes:

- fix spelling of MCJITTests.def file
- make libLTO a shared_library to put it in bin/ on Windows where it is in the
  CMake build too

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

llvm-svn: 351004
2019-01-12 11:56:47 +00:00
Peter Collingbourne
2b7752ef46 gn build: Add a stage2 toolchain for Android.
This makes it possible to build llvm-symbolizer for Android, which
is one of the prerequisites for running the sanitizer tests on Android.

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

llvm-svn: 350979
2019-01-11 23:18:51 +00:00
Peter Collingbourne
2308749462 gn build: Create a template for unix toolchains.
Also change the toolchain description to use current_os instead of
host_os so that the template can be used for cross builds, and add
a current_os to the win toolchain to match the unix toolchain.

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

llvm-svn: 350977
2019-01-11 22:57:57 +00:00
Peter Collingbourne
1b191b21b0 gn build: Merge r350958.
llvm-svn: 350974
2019-01-11 22:15:53 +00:00
Peter Collingbourne
44ac195a8a gn build: Create a variable for the host toolchain and start using it in the tblgen template.
Differential Revision: https://reviews.llvm.org/D56575

llvm-svn: 350964
2019-01-11 19:53:06 +00:00
Peter Collingbourne
9a277e9cce gn build: s/root_out_dir/root_build_dir/g in llvm/utils/gn/build/write_cmake_config.gni.
This makes the generated files go to the right place when using a non-default toolchain.

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

llvm-svn: 350963
2019-01-11 19:51:49 +00:00
Nico Weber
899d99c29c gn build: Add a template for calling write_cmake_config.py
No behavior change.

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

llvm-svn: 350905
2019-01-10 23:10:04 +00:00
Nico Weber
21b2053fcc gn build: Merge r350852
llvm-svn: 350904
2019-01-10 23:05:39 +00:00
Peter Collingbourne
a112e209cc gn build: Use "git rev-parse --git-dir" to discover the path to the .git directory.
This makes it compatible with worktrees.

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

llvm-svn: 350897
2019-01-10 21:57:07 +00:00
Nico Weber
e506e53314 gn build: Merge r350893
llvm-svn: 350894
2019-01-10 21:47:10 +00:00
Nico Weber
244c6fbbbb gn build: Merge r350819
llvm-svn: 350829
2019-01-10 15:16:32 +00:00
Nico Weber
8e2314675c [gn build] Run git ls-files '*.gn' '*.gni' | xargs -n 1 gn format
Looks like I forgot to do that for the PowerPC target.

llvm-svn: 350711
2019-01-09 12:57:52 +00:00
Nico Weber
369110ea34 [gn build] Merge r350669
llvm-svn: 350709
2019-01-09 12:48:06 +00:00
Nico Weber
81ba404f62 [gn build] Add a TODO.txt file
Differential Revision: https://reviews.llvm.org/D56420

llvm-svn: 350708
2019-01-09 12:46:04 +00:00
Alexander Kornienko
070b71657b Make the write_cmake_config.py script python3-compatible
llvm-svn: 350700
2019-01-09 10:49:44 +00:00
Peter Collingbourne
ff49844d20 gn build: Copy file permissions from input file in configure_file() emulation.
Most significantly, this makes bin/llvm-lit executable so that it
can be run in the usual way.

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

llvm-svn: 350688
2019-01-09 04:39:29 +00:00
Peter Collingbourne
15d0ad0568 gn build: Fix a Python2ism in write_vcsrevision.py.
Convert the output of "git rev-parse --short HEAD" to a string before
substituting it into the output file. Without this the output file
will look like this on Python 3:

 #define LLVM_REVISION "git-b'6a4895a025f'"

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

llvm-svn: 350686
2019-01-09 04:05:07 +00:00
Nico Weber
0aed3f8c9d [gn build] Update readme
Differential Revision: https://reviews.llvm.org/D56375

llvm-svn: 350632
2019-01-08 15:19:00 +00:00