Commit Graph

2646 Commits

Author SHA1 Message Date
Peter Collingbourne 096477e25e gn build: Use target OS to control whether to use/depend on llvm-ar.
When cross-compiling from Mac to non-Mac, we need to use the just-built
llvm-ar instead of libtool. We're currently doing the right thing
when determining which archiver command to use, but the path to ar
and the toolchain dependencies were being set based on the host OS
(current_os evaluated in host OS toolchain), instead of the target
OS. Fix the problem by looking up current_os inside toolchain_args.

Differential Revision: https://reviews.llvm.org/D123244
2022-04-06 13:45:40 -07:00
LLVM GN Syncbot ee5fda1ff8 [gn build] Port c03d6257c5 2022-04-06 19:38:53 +00:00
Peter Collingbourne d384f2b253 Revert "gn build: Fix support for building the builtins for baremetal."
This reverts commit b02b9b3dac.

Broke Mac build: http://45.33.8.238/macm1/32578/step_4.txt
2022-04-06 12:16:06 -07:00
LLVM GN Syncbot 2232d35f82 [gn build] Port 9fc45ca00a 2022-04-06 18:21:38 +00:00
Nico Weber 25b7efc9d1 Revert "[gn build] (manually) port 83a798d4b0 (abi_breaking_checks in tests)"
This reverts commit edddf384c2.
83a798d4b0 was reverted in 62a983ebc5.
2022-04-06 14:02:09 -04:00
Peter Collingbourne b02b9b3dac gn build: Fix support for building the builtins for baremetal.
Our support for building for baremetal was conditional on a default
off arg and would have failed to build if you had somehow arranged
to pass the correct --target flag; presumably nobody noticed because
nobody was turning it on. A better approach is to model baremetal
as a separate "OS" called "baremetal" and build it in the same way
as we cross-compile for other targets. That's what this patch does.
I only hooked up the arm64 target but others can be added.

Differential Revision: https://reviews.llvm.org/D122862
2022-04-06 11:01:21 -07:00
LLVM GN Syncbot 324ac838ae [gn build] Port d78624975b 2022-04-06 15:52:20 +00:00
LLVM GN Syncbot c59e833942 [gn build] Port afa94306a8 2022-04-06 14:24:39 +00:00
LLVM GN Syncbot bb47e1fe3d [gn build] Port 68eac9a6e7 2022-04-06 14:15:16 +00:00
Nico Weber edddf384c2 [gn build] (manually) port 83a798d4b0 (abi_breaking_checks in tests) 2022-04-06 08:31:20 -04:00
Nikita Popov ed4e6e0398 [cmake] Remove LLVM_ENABLE_NEW_PASS_MANAGER cmake option
Or rather, error out if it is set to something other than ON. This
removes the ability to enable the legacy pass manager by default,
but does not remove the ability to explicitly enable it through
various flags like -flegacy-pass-manager or -enable-new-pm=0.

I checked, and our test suite definitely doesn't pass with
LLVM_ENABLE_NEW_PASS_MANAGER=OFF anymore.

Differential Revision: https://reviews.llvm.org/D123126
2022-04-06 09:52:21 +02:00
LLVM GN Syncbot 6847081160 [gn build] Port 97e496054a 2022-04-06 03:38:24 +00:00
Nico Weber bf0f5e72bd [gn build] (semi-automatically) Port 4661a65f4b
...and follow-up 970ae8376e.
2022-04-05 09:02:16 -04:00
LLVM GN Syncbot a9bd565ff2 [gn build] Port 3ba8548c8e 2022-04-05 09:06:48 +00:00
LLVM GN Syncbot 331a58ae79 [gn build] Port 0320115c16 2022-04-05 08:34:08 +00:00
Nico Weber 80ce17e3d4 [gn build] Always make symlinks target explicitly depend on base binary
This is a no-op in these files since the symlinks array is never empty
and the dependency to the base binary is added through the loop in these
cases.

But adding them doesn't hurt either, and it:
1. Makes all symlinks targets look the same, independent of symlinks
   are created always or just conditionally based on gn args
2. Makes it less likely that bugs like the one fixed by b0abada8fe
   are introduced by copy-pasting an existing symlink target and then
   not being careful enough when tweaking it.

No behavior change.
2022-04-04 09:54:41 -04:00
LLVM GN Syncbot ed020808d7 [gn build] Port 980c3e6dd2 2022-04-04 13:48:25 +00:00
Nico Weber b0abada8fe [gn build] llvm-lipo, llvm-libtool-darwin symlink targets now dep on binary
This fixes a regression from 69cde915e923d: If llvm_install_cctools_symlinks
is false, depending llvm-lipo:symlinks didn't actually depend on llvm-lipo
and the binary didn't get built as dependency of `check-lld` (because the
`symlinks` array ended up empty).
2022-04-04 09:20:49 -04:00
LLVM GN Syncbot 6020830e88 [gn build] Port e476df5629 2022-04-03 15:09:33 +00:00
LLVM GN Syncbot 3bab268f95 [gn build] Port f547fc89c0 2022-04-01 21:24:52 +00:00
LLVM GN Syncbot 6d481adb35 [gn build] Port fc7573f29c 2022-03-31 22:04:13 +00:00
LLVM GN Syncbot c7639f896c [gn build] Port 46774df307 2022-03-31 17:50:34 +00:00
Nico Weber d2f7547f14 [gn build] (manually) port 19246b0779 2022-03-31 11:10:18 -04:00
LLVM GN Syncbot f54f448525 [gn build] Port 1410a4860e 2022-03-30 07:33:49 +00:00
LLVM GN Syncbot 5314582407 [gn build] Port 90cb325abd 2022-03-29 06:21:57 +00:00
LLVM GN Syncbot 75c8585ef0 [gn build] Port 2add3fbd97 2022-03-28 23:38:54 +00:00
LLVM GN Syncbot 040c80924c [gn build] Port c5e54e2752 2022-03-28 20:09:41 +00:00
LLVM GN Syncbot 12f0802c93 [gn build] Port c0eb9b4cde 2022-03-28 08:27:36 +00:00
LLVM GN Syncbot f7e3174ec0 [gn build] Port ad57e10dbc 2022-03-28 06:40:50 +00:00
LLVM GN Syncbot 139416cb5e [gn build] Port 555214cbcc 2022-03-26 16:10:19 +00:00
Sam McCall 57ee624d79 [cmake] Provide CURRENT_TOOLS_DIR centrally, replacing CLANG_TOOLS_DIR
CLANG_TOOLS_DIR holds the the current bin/ directory, maybe with a %(build_mode)
placeholder. It is used to add the just-built binaries to $PATH for lit tests.
In most cases it equals LLVM_TOOLS_DIR, which is used for the same purpose.
But for a standalone build of clang, CLANG_TOOLS_DIR points at the build tree
and LLVM_TOOLS_DIR points at the provided LLVM binaries.

Currently CLANG_TOOLS_DIR is set in clang/test/, clang-tools-extra/test/, and
other things always built with clang. This is a few cryptic lines of CMake in
each place. Meanwhile LLVM_TOOLS_DIR is provided by configure_site_lit_cfg().

This patch moves CLANG_TOOLS_DIR to configure_site_lit_cfg() and renames it:
 - there's nothing clang-specific about the value
 - it will also replace LLD_TOOLS_DIR, LLDB_TOOLS_DIR etc (not in this patch)

It also defines CURRENT_LIBS_DIR. While I removed the last usage of
CLANG_LIBS_DIR in e4cab4e24d, there are LLD_LIBS_DIR usages etc that
may be live, and I'd like to mechanically update them in a followup patch.

Differential Revision: https://reviews.llvm.org/D121763
2022-03-25 20:22:01 +01:00
LLVM GN Syncbot a78bd83264 [gn build] Port cef52105bd 2022-03-25 18:54:35 +00:00
LLVM GN Syncbot bb48c3a9e7 [gn build] Port 39b80c8380 2022-03-25 15:50:53 +00:00
LLVM GN Syncbot 382797d475 [gn build] Port 75112133b8 2022-03-25 07:28:25 +00:00
Nico Weber c4eae8a4eb Make BLAKE3 a component library
It's unusual that BLAKE3/CMakeLists.txt just defines a list of
files that it injects into its parent scope. The list should either
be defined in llvm/lib/Support/CMakeLists.txt, or
llvm/lib/Support/BLAKE3/CMakeLists.txt should define an object
library.

This does the latter. It makes llvm/lib/Support/BLAKE3/CMakeLists.txt
more self-contained.

No behavior change.

Differential Revision: https://reviews.llvm.org/D122428
2022-03-24 21:16:55 -04:00
Arthur Eubanks df0b893d94 [opt] Remove -analyze option
This is legacy PM-specific, which is deprecated.

Uses of this should be replaced with a corresponding `-passes='print<foo>'`.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D122420
2022-03-24 14:10:57 -07:00
Nico Weber 8705708b6d Revert "[gn build] Manually port llvm/lib/Support/BLAKE3"
This reverts commit 8424d4f641.
That approach doesn't work. I checked in something that kinda
works 30 min ago or so.
2022-03-24 15:24:02 -04:00
LLVM GN Syncbot 1e3713f6df [gn build] Port 2022-03-24 19:11:19 +00:00
Fangrui Song 8424d4f641 [gn build] Manually port llvm/lib/Support/BLAKE3 2022-03-24 12:06:19 -07:00
Nico Weber 973acc3db5 [gn build] ugly hack to work around sync script for now 2022-03-24 14:56:51 -04:00
Nico Weber 0bfa1ab025 [gn build] (manually) port 9aa701984d (BLAKE3) 2022-03-24 14:51:24 -04:00
Arthur Eubanks a7ea304f93 [gn build] Manually port 0c86198b2 2022-03-24 10:56:21 -07:00
LLVM GN Syncbot ced9bbe0b2 [gn build] Port 62d5f254cc 2022-03-24 13:50:02 +00:00
Nico Weber 028f9f5b2b [gn build] remove a "from __future__" import not needed after 0ff3cc2087 2022-03-24 09:07:54 -04:00
LLVM GN Syncbot 621cc83fc1 [gn build] Port 406bde9a15 2022-03-24 12:12:11 +00:00
LLVM GN Syncbot bf6f5113bc [gn build] Port 64902d335c 2022-03-24 01:49:33 +00:00
Zequan Wu 0396e229cd Revert "[gn build] Port 9c542a5a4e1b"
This reverts commit e28ace8a97.
2022-03-23 16:11:54 -07:00
Nico Weber 0ff3cc2087 [gn build] Change python run lines to python3
macOS 12.3 no longer ships non-3 python.

Almost all of these scripts were launched by ninja, and the GN files
already told it to run them under python3, so this is a fairly small
change.  The main effect is that if you run them manually, you now
get the same behavior.

(A small set of scripts, gn.py, gen.py, sync_source_lists_from_cmake.py,
are for manual running.  For these, it is an actual change.)

Differential Revision: https://reviews.llvm.org/D122345
2022-03-23 16:42:18 -04:00
Nico Weber 88da78ddd0 Install symlink "otool" if LLVM_INSTALL_CCTOOLS_SYMLINKS is set
Differential Revision: https://reviews.llvm.org/D122313
2022-03-23 16:22:24 -04:00
Nico Weber 69cde915e9 [gn build] add llvm_install_cctools_symlinks arg
It behaves (mostly) like the LLVM_INSTALL_CCTOOLS_SYMLINKS option
in cmake.

The minor difference is that the llvm-objcopy symlinks bitcode_strip
and install_name_tool symlink to llvm-objcopy directly in the GN build,
while it's a bitcode_strip -> llvm-bitcode-strip -> objcopy chain
in the CMake build (and analogous for install_name_tool).

The implementation is very similar to the implementation of the
existing llvm_install_binutils_symlinks arg.

Differential Revision: https://reviews.llvm.org/D122312
2022-03-23 16:19:54 -04:00