1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
Commit Graph

7040 Commits

Author SHA1 Message Date
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
Dan Liew
41fa775438 [lit] Make it possible for the lit test suite to pass with
`FILECHECK_OPTS=-v` set in the environment.

Follow up to r350850 as requested by Joel E. Denny in
https://reviews.llvm.org/D56541 .

llvm-svn: 350854
2019-01-10 17:47:44 +00:00
Nico Weber
244c6fbbbb gn build: Merge r350819
llvm-svn: 350829
2019-01-10 15:16:32 +00:00
Aaron Ballman
91283eb602 Fix visualization of intrusive reference counted objects in MSVC.
llvm-svn: 350748
2019-01-09 18:59:56 +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
Nico Weber
626465a5d8 [gn build] Make sync_source_lists_from_cmake.py check that all LLVM unittests are present
Now that the PowerPC and WebAssembly targets are added, this check passes.

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

llvm-svn: 350631
2019-01-08 15:17:19 +00:00
Nico Weber
5f6df0d499 [gn build] Add build files for llvm/lib/Target/PowerPC + tests
The PowerPC target itself is similar to the X86 target in https://reviews.llvm.org/rL348903
The llvm-exegesis unittests bits are similar to the corresponding AArch64 in https://reviews.llvm.org/rL350499
The whole patch is very similar to the WebAssembly target being added in https://reviews.llvm.org/rL350628

Also add a dep from tools/llvm-exegesis/lib to the AArch64 subdir, which I
failed to do in r350499.

The motivation for this target is solely that it has a unit test and I want to
enable the GN<->CMake unittest syncing check for llvm.

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

llvm-svn: 350629
2019-01-08 15:16:14 +00:00
Nico Weber
b72ac813cd [gn build] Add build files for llvm/lib/Target/WebAssembly + tests
The WebAssembly target itself is similar to the X86 target in https://reviews.llvm.org/rL348903
The unittests bits are similar to the corresponding AArch64 in https://reviews.llvm.org/rL350499

The motivation for this target is solely that it has a unit test and I want to
enable the GN<->CMake unittest syncing check for llvm. (After this, only the
PowerPC target is needed and I can turn it on.)

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

llvm-svn: 350628
2019-01-08 15:12:42 +00:00
Peter Collingbourne
91cddf4ad1 gn build: Stop passing -o to ar.
The -o flag means something different to ar than what appears to be
intended here. Also, llvm-ar doesn't accept the flag in this position.

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

llvm-svn: 350604
2019-01-08 04:00:22 +00:00
Peter Collingbourne
7e788104a4 gn build: Merge r350580.
llvm-svn: 350600
2019-01-08 01:46:57 +00:00
David Greene
7b9799ff50 [lit] Respect PYTHONPATH
If a user has PYTHONPATH set in the environment, append new entries to
it rather than blindly setting PYTHONPATH to a fixed string. This
allows tests to, for example, find psutil if it is in
PYTHONPATH. Without this change, lit will detect psutil but then
various tests will fail because PYTHONPATH has been overwritten and
psutil cannot be found.

llvm-svn: 350536
2019-01-07 16:24:37 +00:00
Nico Weber
6ee9d1c968 [gn build] Add build files for llvm/lib/Target/ARM + tests
The ARM target itself is similar to the X86 target in https://reviews.llvm.org/rL348903
The llvm-exegesis unittests ARM bits are similar to the X86 bits in https://reviews.llvm.org/rL350413
Both are similar to the corresponding AArch64 bits in https://reviews.llvm.org/rL350499 too

After this, everything in my local GN branch is upstreamed to LLVM.

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

llvm-svn: 350500
2019-01-07 01:26:12 +00:00
Nico Weber
001174a89a [gn build] Add build files for llvm/lib/Target/AArch64 + tests
The AArch64 target itself is similar to the X86 target in https://reviews.llvm.org/rL348903
The llvm-exegesis AArch64 bits are similar to the X86 bits in http://reviews.llvm.org/rL350184
The llvm-exegesis unittests AArch64 bits are similar to the X86 bits in https://reviews.llvm.org/rL350413

llvm/unittests/Target/AArch64 doesn't have an equivalent since the X86 Target
only has lit tests, no unittests.

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

llvm-svn: 350499
2019-01-07 01:23:11 +00:00
Nico Weber
9757ebb64f [gn build] Merge r350341
Adds a build file for llvm-elfabi and makes check-llvm depend on it.

llvm-svn: 350494
2019-01-06 15:49:10 +00:00
Nico Weber
c2fff4a289 [gn build] Add build files for LLVM unittests with a custom main() function
Differential Revision: https://reviews.llvm.org/D56219

llvm-svn: 350492
2019-01-06 15:09:22 +00:00
Mike Spertus
697c9329fc Enhance MSVC visualization of PointerUnions
Add a "deref" view that displays the pointed to objects since
other visualizers often need to display data reference by internal
PointerUnions

llvm-svn: 350469
2019-01-05 16:59:27 +00:00
Nico Weber
ef51073c71 [gn build] Merge r350423
llvm-svn: 350458
2019-01-05 05:01:20 +00:00
Nico Weber
46ba40fe63 [gn build] Add build files for unittests under llvm/unittests/ExecutionEngine
Differential Revision: https://reviews.llvm.org/D56328

llvm-svn: 350457
2019-01-05 04:05:25 +00:00
Nico Weber
aa255842e3 [gn build] Add build files for unittests that load shared libraries
This is slightly ugly for three reasons:

- The shlib needs to go next to the binary to be found on all platforms, so the
  build files refer to target_out_dir
- The explicit -fPIC flag needed on the shared lib side, and the -rdynamic flag
  needed on the host side, on Linux 
- Plugins that refer to LLVM code and assume that the host will resolve them
  don't work on Windows -- PluginsTests won't test anything on Windows (but
  DynamicLibraryTests will, since the dll here doesn't call LLVM code)


If we get lots more of these plugin / plugin host targets it might make sense
to add a template for them. But for now, these are the last ones we need.

(We're at 6 plugin hosts, 2 of them tests, and at 6 shared libraries, 2 of them
tests as well. clang is a plugin host by default in the CMake build but not
(yet?) in the GN build.)

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

llvm-svn: 350454
2019-01-05 01:39:18 +00:00
Nico Weber
cd3fb747e9 [gn build] Add build file for DebugInfoPDBTests
I'm pretty unhappy this patch: DebugInfoPDBTests uses an API that requires some
magic txt file to be next to the unit test executable that stores the absolute
path to the LLVM source root.

The choices here are:

1. Don't use the unittest() template for DebugInfoPDBTests and set output_dir
   for unit tests in two places (the gni file for every test but this one, and the
   BUILD.gn file for this specific test).

2. Add another unittest_foo() template variation for this one test.

I went with the former, and added a comment to the template to look out for
this.

(The CMake build has the same issue.)

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

llvm-svn: 350447
2019-01-05 00:14:37 +00:00
Nico Weber
95b2f2aea2 [gn build] Merge r350351
llvm-svn: 350418
2019-01-04 17:32:28 +00:00
Nico Weber
7615432325 [gn build] Add even more build files for LLVM unittests
Another random assortment of easy build files.

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

llvm-svn: 350413
2019-01-04 17:16:21 +00:00
Nico Weber
a9cbb9c924 [gn build] Add more build files for LLVM unittests
A fairly random assortment of build files that are easy.

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

llvm-svn: 350412
2019-01-04 17:15:38 +00:00
Nico Weber
cf252628a1 [gn build] Start adding build files for LLVM unittests
Adds build files for //llvm/unittest/[A-D].

Also teach sync_source_lists_from_cmake.py to not complain about missing
BUILD.gn files for CMakeLists.txt files that just call add_subdirectory()
without calling add_.+_unittest, like e.g.
llvm/unittests/Target/CMakeLists.txt.

(Omits CodeGen/GlobalISel and DebugInfo/PDB because their build files are somewhat interesting, and this patch is already on the larger side.)

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

llvm-svn: 350411
2019-01-04 17:14:55 +00:00
Nico Weber
51b84418d4 [gn build] Add check-llvm target and make it work
With this, check-llvm runs and passes all of clang's lit tests. It doesn't run
any of its unit tests yet.

This is the only change in the GN build patch series that needs a change to a
file outside of llvm/utils/gn: llvm/test/tools/llvm-config/booleans.test checks
the result of llvm-config --build-system for some reason, so I'm updating the
test to accept "gn" as valid output in addition to "cmake". (The alternative
would be to let the gn build self-identify as cmake, which seems worse.)

Like with check-clang and check-lld, running just ninja -C out/gn will build
all prerequisites needed to run tests, but it won't run the tests (so that the
build becomes clean after one build). Running ninja -C out/gn check-llvm will
build prerequisites if needed and run the tests. The check-llvm target never
becomes clean and runs tests every time.

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

llvm-svn: 350410
2019-01-04 17:13:33 +00:00
Nico Weber
ae79d8b55c [gn build] Add build file for libLTO.dylib
Not used by anything yet, but will be needed to make check-llvm run ld64's libLTO plugin tests.

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

llvm-svn: 350409
2019-01-04 17:12:25 +00:00
Nico Weber
a2be1b6bef [gn build] Add build files for llvm/lib/{LineEditor,Testing/Support,TextAPI}
Nothing pulls them in yet, but they will be needed for check-llvm.

LineEditor depends on libedit, so create a gn/build/lib for it, following the
usual pattern.

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

llvm-svn: 350407
2019-01-04 17:11:46 +00:00
Nico Weber
3a681a4f10 [gn build] Make write_cmake_config.py check that each key passed is unique
I got that wrong once while locally while working on check-llvm.

Reviewed as part of https://reviews.llvm.org/D56195

llvm-svn: 350394
2019-01-04 13:48:58 +00:00
Wouter van Oortmerssen
455fd1a690 [WebAssembly] Fixed disassembler not knowing about new brlist operand
Summary:
The previously introduced new operand type for br_table didn't have
a disassembler implementation, causing an assert.

Reviewers: dschuff, aheejin

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 350366
2019-01-03 23:01:30 +00:00
Serge Guelton
a749c2ae5c Python compat - no explicit reference to Python version
Update documentation and shebang.

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

llvm-svn: 350327
2019-01-03 15:44:24 +00:00
Serge Guelton
01c86ce50d Python compat - iterator protocol
In Python2 next() is used wile it's __next__ in Python3.

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

llvm-svn: 350326
2019-01-03 15:43:14 +00:00
Serge Guelton
6a77c32524 Python compat - urllib
Differential Revision: https://reviews.llvm.org/D56261

llvm-svn: 350315
2019-01-03 14:12:44 +00:00
Serge Guelton
5aaf03f132 Python compat - has_key vs. in operator
Use portable `in` operator instead of `has_key(...)` method.

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

llvm-svn: 350314
2019-01-03 14:12:37 +00:00
Serge Guelton
503314e807 Python compat - map/filter
Differential Revision: https://reviews.llvm.org/D56259

llvm-svn: 350313
2019-01-03 14:12:30 +00:00
Serge Guelton
0c9eaa5247 Python compat - iteritems() vs. items()
Always use `items()` and introduce extra `list(...)` call when needed.

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

llvm-svn: 350312
2019-01-03 14:12:23 +00:00