Commit Graph

274 Commits

Author SHA1 Message Date
Fangrui Song a42bd1b560 [CMake] Change -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=off to -DLLVM_ENABLE_NEW_PASS_MANAGER=off
LLVM_ENABLE_NEW_PASS_MANAGER is set to ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER, so
-DLLVM_ENABLE_NEW_PASS_MANAGER=off has no effect.

Change the cache variable to LLVM_ENABLE_NEW_PASS_MANAGER instead.
A user opting out the new PM needs to switch from
-DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=off to
-DLLVM_ENABLE_NEW_PASS_MANAGER=off.

Also give a warning that -DLLVM_ENABLE_NEW_PASS_MANAGER=off is deprecated.

Reviewed By: aeubanks, phosek

Differential Revision: https://reviews.llvm.org/D108775
2021-08-26 14:25:31 -07:00
Leonard Chan e2ff880a7e [clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs
This is a reland of commit a9d1970384.

Differential Revision: https://reviews.llvm.org/D99364
2021-08-10 10:52:24 -07:00
Petr Hosek a9d1970384 Revert "[clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs"
This reverts commit bb438f6cbf since
it broke our Windows builders and we need more time to investigate
the issue.
2021-07-30 18:56:51 -07:00
Leonard Chan bb438f6cbf [clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs
Differential Revision: https://reviews.llvm.org/D99364
2021-07-30 11:53:21 -07:00
Haowei Wu 6103fdfab4 [ifs][elfabi] Merge llvm-ifs/elfabi tools
This change merges llvm-elfabi and llvm-ifs tools.

Differential Revision: https://reviews.llvm.org/D100139
2021-07-19 11:23:19 -07:00
Leonard Chan 9b0ddc2662 [clang][Fuchsia] Remove relative-vtables multilibs
As of D102374, relative vtables is enabled on Fuchsia by default, so we don't need any of the RV multilibs.

Differential revision: https://reviews.llvm.org/D105145
2021-06-30 11:21:37 -07:00
Daniel Hwang d9cf8291e7 Create install targets for scan-build-py.
A new revision identical to https://reviews.llvm.org/D101139
The parent revision of aforementioned revision seems to cause pre-merge checks to fail opaquely. Seeing if creating a new revision will work.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D104138
2021-06-21 13:08:34 -07:00
Petr Hosek 0d5af7a4ca Revert "[CMake] Don't use libc++ by default on Windows yet"
This reverts commit b413e44200.
2021-06-11 00:45:49 -07:00
Petr Hosek b413e44200 [CMake] Don't use libc++ by default on Windows yet
libc++ has issues when used with -fno-exceptions and vcruntime,
don't use it on Windows by default until we address those issues.

Differential Revision: https://reviews.llvm.org/D103941
2021-06-08 23:57:14 -07:00
Petr Hosek 1683dbf0dd [CMake][Fuchsia] Disable vcruntime for first stage as well
Using vcruntime is breaking libc++ headers so don't use it.

Differential Revision: https://reviews.llvm.org/D103926
2021-06-08 13:44:24 -07:00
Petr Hosek a7142f5c91 Partially revert the Fuchsia changes to avoid the use of PIC
This reverts commit:
2a5afb4665
de98da2ece
1dba2a0269
2021-06-08 13:03:26 -07:00
Petr Hosek 2a5afb4665 [CMake][Fuchsia] Use PIC for Fuchsia runtimes
Disabling PIC globally also disabled PIC for runtimes which was
undesirable, manually override it.

Differential Revision: https://reviews.llvm.org/D103919
2021-06-08 12:30:27 -07:00
Petr Hosek f673365e1c [CMake][Fuchsia] Include llvm-otool in Fuchsia toolchain
We want to use llvm-otool in our build.

Differential Revision: https://reviews.llvm.org/D103918
2021-06-08 11:25:17 -07:00
Petr Hosek de98da2ece [CMake] Only include LTO on Apple targets
We only need libLTO when using ld64.

Differential Revision: https://reviews.llvm.org/D103916
2021-06-08 11:00:01 -07:00
Petr Hosek 1dba2a0269 [Fuchsia] Update some of the Fuchsia toolchain flags
This should make the build more self-contained.

Differential Revision: https://reviews.llvm.org/D103875
2021-06-08 10:04:19 -07:00
Petr Hosek e237168341 Revert "[Fuchsia] Use libc++abi on Windows in Fuchsia toolchain"
This reverts commit b5dd421a3a which
broke Fuchsia downstream builders.
2021-06-03 01:18:22 -07:00
Petr Hosek b5dd421a3a [Fuchsia] Use libc++abi on Windows in Fuchsia toolchain
Don't use vcruntime, this makes our toolchain more hermetic and avoids
some compiler errors we've encountered in compiler-rt.

Differential Revision: https://reviews.llvm.org/D103555
2021-06-02 14:56:27 -07:00
Leonard Chan da1db49409 [Fuchsia] Add compat multilibs to cache file
Differential Revision: https://reviews.llvm.org/D103477
2021-06-01 15:14:56 -07:00
Haowei Wu 0ce58c52d5 [Fuchsia][CMake] Add missing include path.
This patch adds include path for missing header files from "sync".
This patch also fixes the build failures caused by scudo.

Differential Revision: https://reviews.llvm.org/D103218
2021-05-26 19:59:53 -07:00
Vladimir Vereschaka b5a80a0f37 [CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC
Parametrize the cache file with TARGET_TRIPLE parameter. Normalize
the target triple to follow the runtime library installation directory.

Explicity enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR option.
2021-05-18 20:29:16 -07:00
Shoaib Meenai 56f7e5a822 [cmake] Add support for multiple distributions
LLVM's build system contains support for configuring a distribution, but
it can often be useful to be able to configure multiple distributions
(e.g. if you want separate distributions for the tools and the
libraries). Add this support to the build system, along with
documentation and usage examples.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D89177
2021-05-12 11:13:18 -07:00
Petr Hosek 8cb191b724 [Fuchsia][CMake] Update OSX deployment target
Use correct spelling of CMAKE_OSX_DEPLOYMENT_TARGET and bump the
minimum version to 10.13 which matches what we use for host tools
in Fuchsia.

Differential Revision: https://reviews.llvm.org/D102013
2021-05-06 12:06:16 -07:00
Vladimir Vereschaka 74d9a76ad3 [CMake] Stop using c++ subdirectory for libc++ on Win to ARM Linux cross builds. NFC
Updated cross Win-x-ARM Linux toolchain cmake cache file in according of
the following changes: https://reviews.llvm.org/D100869

Stop using use c++ subdirectory for libc++ library
2021-04-29 14:23:33 -07:00
Petr Hosek ba631240ae [CMake] Set correct CXX_FLAGS for relative-vtables variants
We overrite CXX_FLAGS to enable relative vtables, but doing so
overwrites generic Fuchsia CXX_FLAGS leading to a build failure
on Windows.

Differential Revision: https://reviews.llvm.org/D101551
2021-04-29 10:34:37 -07:00
Petr Hosek 36430d44ed [Driver] Use normalized triples for per-target runtimes
This is a partial revert of b4537c3f51
based on the discussion in https://reviews.llvm.org/D101194. Rather
than using the getMultiarchTriple, we use the getTripleString.
2021-04-27 22:31:36 -07:00
Petr Hosek 3a3fbbe217 [Fuchsia] Use correct target triple for ARM
The Debian multiarch triple is arm-linux-gnueabihf, but the target
is armv7-linux-gnueabihf because some builtins require armv7.
2021-04-26 23:48:12 -07:00
Petr Hosek b4537c3f51 [Driver] Push multiarch path setup to individual drivers
Different platforms use different rules for multiarch triples so
it's difficult to provide a single method for all platforms. We
instead move the getMultiarchTriple to the ToolChain class and let
individual platforms override it and provide their custom logic.

Differential Revision: https://reviews.llvm.org/D101194
2021-04-26 22:17:26 -07:00
Dan Liew 4c0bc69490 Ship `llvm-cxxfilt` in the toolchain.
Originally done for rdar://problem/57155465.

rdar://76602859

Differential Revision: https://reviews.llvm.org/D100405
2021-04-13 11:58:33 -07:00
Dan Liew f66e05a720 Include `count` in AppleClang toolchains.
The motivation here is so we can run the compiler-rt tests
from a standalone build against AppleClang.

In particular the `Posix/halt_on_error-torture.cpp` and
`Posix/halt_on_error_suppress_equal_pcs.cpp` ASan test cases currently
require this binary for the tests to pass.

rdar://76366784

Differential Revision: https://reviews.llvm.org/D100087
2021-04-08 14:00:29 -07:00
Dan Liew 73cbc7f60e Include `llvm-config` and `not` in AppleClang toolchains.
The motivation here is so that we can configure and run compiler-rt
tests from a standalone build against AppleClang.

rdar://75975846

Differential Revision: https://reviews.llvm.org/D100086
2021-04-07 21:29:52 -07:00
Petr Hosek 39f3e9a9e0 [CMake][Fuchsia] Include llvm-lipo
We want to use llvm-lipo for building universal libraries.

Differential Revision: https://reviews.llvm.org/D99243
2021-03-24 14:21:40 -07:00
Timm Bäder d9ef6bc426 [clang] Disable LTO and LLD on SystemZ for stage3 builds
LLD does not support SystemZ, so it doesn't make sense to use it for
boostrap/stage3 builds, and using LTO in these cases won't work.

Differential Revision: https://reviews.llvm.org/D89942
2021-03-17 15:15:41 +01:00
Petr Hosek 75cdeff43b [Fuchsia] Add check-polly to CLANG_BOOTSTRAP_TARGETS
This is necessary so we can run Polly tests in 2 stage build.

Differential Revision: https://reviews.llvm.org/D98572
2021-03-12 18:31:20 -08:00
Petr Hosek 3cd2f42521 [Fuchsia] Enable Polly for first stage as well
We want Polly enabled for both stages of the toolchain build.

Differential Revision: https://reviews.llvm.org/D98018
2021-03-05 14:35:57 -08:00
Petr Hosek 1d1983f2d0 [CMake] Enable Polly for Fuchsia toolchain build
We want to enable the use of Polly in Fuchsia.

Differential Revision: https://reviews.llvm.org/D97819
2021-03-02 16:51:16 -08:00
Ryan Prichard 729899f7b6 [libunwind] unw_* alias fixes for ELF and Mach-O
Rename the CMake option, LIBUNWIND_HERMETIC_STATIC_LIBRARY, to
LIBUNWIND_HIDE_SYMBOLS. Rename the C macro define,
_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS, to _LIBUNWIND_HIDE_SYMBOLS,
because now the macro adds a .hidden directive rather than merely
suppress visibility annotations.

For ELF, when LIBUNWIND_HIDE_SYMBOLS is enabled, mark unw_getcontext as
hidden. This symbol is the only one defined using src/assembly.h's
WEAK_ALIAS macro. Other unw_* weak aliases are defined in C++ and are
already hidden.

Mach-O doesn't support weak aliases, so remove .weak_reference and
weak_import. When LIBUNWIND_HIDE_SYMBOLS is enabled, output
.private_extern for the unw_* aliases.

In assembly.h, add missing SYMBOL_NAME macro invocations, which are
used to prefix symbol names with '_' on some targets.

Fixes PR46709.

Reviewed By: #libunwind, phosek, compnerd, steven_wu

Differential Revision: https://reviews.llvm.org/D93003
2021-02-22 16:54:05 -08:00
Fangrui Song 02413b097e [CMake] Delete LLVM_RUNTIME_BUILD_ID_LINK_TARGETS
Announcement: https://lists.llvm.org/pipermail/llvm-dev/2021-February/148446.html

Differential Revision: https://reviews.llvm.org/D96360
2021-02-15 11:06:23 -08:00
Andrzej Warzynski 62e4f22e29 [clang] Add AddClang.cmake to the list of the CMake modules that are installed
This makes sure that AddClang.cmake is installed alongside other Clang
CMake modules. This mirrors LLVM and MLIR in this respect and is
required when building the new Flang driver out of tree (as it depends
on Clang and includes AddClang.cmake).

Reviewed By: bogner

Differential Revision: https://reviews.llvm.org/D94533
2021-02-04 12:38:38 +00:00
Leonard Chan c0e94e9974 [clang][Fuchsia] Add relative-vtables + asan multilibs
We're choosing to take an opt-in approach for landing Relative VTables, so we'll
need asan-equivalent multilibs with relative vtables enabled. Afterwards, we can
just flip the switch in our build.

Differential Revision: https://reviews.llvm.org/D95253
2021-01-25 15:24:16 -08:00
Roland McGrath 70764c02e4 [CMake][Fuchsia] Install llvm-elfabi
The canonical Fuchsia toolchain configuration installs llvm-elfabi.

Reviewed By: haowei

Differential Revision: https://reviews.llvm.org/D92444
2020-12-02 11:59:14 -08:00
Leonard Chan 1e91803c67 Recommit "[clang][Fuchsia] Add relative-vtables multilib"
This recommits fdbd84c6c8 whose initial
build issues were fixed in 19bdc8e5a3.
2020-12-01 17:03:13 -08:00
Leonard Chan 7bc944c102 Revert "[clang][Fuchsia] Add relative-vtables multilib"
This reverts commit fdbd84c6c8.

Reverting due to failing CI builders for Fuchsia's toolchain:
https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8862150211240186992?
2020-11-30 19:21:35 -08:00
Leonard Chan fdbd84c6c8 [clang][Fuchsia] Add relative-vtables multilib
This adds multilibs for Fuchsia that is built with the relative vtables ABI,
one with and another without exceptions.

Differential Revision: https://reviews.llvm.org/D85576
2020-11-30 18:21:10 -08:00
Leonard Chan a160189c5d Revert "[clang][Fuchsia] Add relative-vtables multilib"
This reverts commit 7c2bc3b71d.

Forgot to add the ifferential revision.
2020-11-30 18:20:01 -08:00
Leonard Chan 7c2bc3b71d [clang][Fuchsia] Add relative-vtables multilib
This adds a multilib for Fuchsia that is built with the relative vtables
ABI.
2020-11-30 18:17:38 -08:00
Vladimir Vereschaka b09154ebf9 [CMake] Explicity set up RPATH for the runtime libs on Win to ARM Linux cross builds.
Since RPATH initialization was disabled for the runtime libraries to
avoid overwriting RPATH unconditionally we need to explicity set up it
for the Win to Arm Linux cross builds.

See some details here: https://reviews.llvm.org/D91099
2020-11-13 14:32:35 -08:00
Alex Orlov 8aaafa06b2 Added remotely ran compiler-rt tests.
Use LLVM/utils/remote-exec.py to run compiler-rt tests remotely on the target.

Reviewed By: vvereschaka

Differential Revision: https://reviews.llvm.org/D90054
2020-10-30 00:11:16 +04:00
Jonas Devlieghere 27a909a24f [Apple-stage2] Install FileCheck and yaml2obj in the toolchain
rdar://70274446

Differential revision: https://reviews.llvm.org/D89763
2020-10-20 13:46:44 -07:00
Louis Dionne eaa928b71a [libc++] Explicitly request new/delete in libc++ for Win to ARM Linux builds
Since 9b40ee8eb0, new/delete must be requested explicitly during the
CMake configuration if one wants these definitions to appear in libc++.

Differential Revision: https://reviews.llvm.org/D89793
2020-10-20 10:51:05 -04:00
Petr Hosek b72813f4d6 [CMake][Fuchsia] Start building arm64 Darwin runtimes
This enables arm64 Darwin support in Fuchsia toolchain.
2020-10-13 19:50:45 -07:00