Commit Graph

260 Commits

Author SHA1 Message Date
Louis Dionne 7300a651f5 [libc++] Re-apply "Always build c++experimental.a""
This re-applies bb939931a1, which had been reverted by 09cebfb978
because it broke Chromium. The issues seen by Chromium should be
addressed by 1d0f79558c.

Differential Revision: https://reviews.llvm.org/D128927
2022-07-19 10:44:19 -04:00
Hans Wennborg 09cebfb978 Revert "[libc++] Always build c++experimental.a"
This caused build failures when building Clang and libc++ together on Mac:

  fatal error: 'experimental/memory_resource' file not found

See the code review for details. Reverting until the problem and how to
solve it is better understood.

(Updates to some test files were not reverted, since they seemed
unrelated and were later updated by 340b48b267b96.)

> This is the first part of a plan to ship experimental features
> by default while guarding them behind a compiler flag to avoid
> users accidentally depending on them. Subsequent patches will
> also encompass incomplete features (such as <format> and <ranges>)
> in that categorization. Basically, the idea is that we always
> build and ship the c++experimental library, however users can't
> use what's in it unless they pass the `-funstable` flag to Clang.
>
> Note that this patch intentionally does not start guarding
> existing <experimental/FOO> content behind the flag, because
> that would merely break users that might be relying on such
> content being in the headers unconditionally. Instead, we
> should start guarding new TSes behind the flag, and get rid
> of the existing TSes we have by shipping their Standard
> counterpart.
>
> Also, this patch must jump through a few hoops like defining
> _LIBCPP_ENABLE_EXPERIMENTAL because we still support compilers
> that do not implement -funstable yet.
>
> Differential Revision: https://reviews.llvm.org/D128927

This reverts commit bb939931a1.
2022-07-18 16:57:15 +02:00
Petr Hosek a8e6056e24 [CMake][Fuchsia] Use libunwind as the default unwinder
Fuchsia already uses libunwind, but it does so implicitly via libc++.
This change makes the unwinder choice explicit.

Differential Revision: https://reviews.llvm.org/D127887
2022-07-09 18:15:04 +00:00
Petr Hosek d3dd6e57fe [Fuchsia] Remove the test cflags to explicitly set the unwinder
These are no longer needed and cause issue when cross-compiling.
2022-07-09 17:08:35 +00:00
Petr Hosek df90d22704 [CMake] Option to select C++ library for runtimes that use it
We currently have an option to select C++ ABI and C++ library for tests
but there are runtimes that use C++ library, specifically ORC and XRay,
which aren't covered by existing options. This change introduces a new
option to control the use of C++ libray for these runtimes.

Ideally, this option should become the default way to select C++ library
for all of compiler-rt replacing the existing options (the C++ ABI
option could remain as a hidden internal option).

Differential Revision: https://reviews.llvm.org/D128036
2022-07-08 22:10:24 +00:00
Louis Dionne bb939931a1 [libc++] Always build c++experimental.a
This is the first part of a plan to ship experimental features
by default while guarding them behind a compiler flag to avoid
users accidentally depending on them. Subsequent patches will
also encompass incomplete features (such as <format> and <ranges>)
in that categorization. Basically, the idea is that we always
build and ship the c++experimental library, however users can't
use what's in it unless they pass the `-funstable` flag to Clang.

Note that this patch intentionally does not start guarding
existing <experimental/FOO> content behind the flag, because
that would merely break users that might be relying on such
content being in the headers unconditionally. Instead, we
should start guarding new TSes behind the flag, and get rid
of the existing TSes we have by shipping their Standard
counterpart.

Also, this patch must jump through a few hoops like defining
_LIBCPP_ENABLE_EXPERIMENTAL because we still support compilers
that do not implement -funstable yet.

Differential Revision: https://reviews.llvm.org/D128927
2022-07-08 16:58:22 -04:00
Petr Hosek d34ce04f98 [CMake][Fuchsia] Install static libuwind
This can now be used with -static-libgcc.

Differential Revision: https://reviews.llvm.org/D129218
2022-07-06 17:17:40 +00:00
Petr Hosek 68050c2354 Revert "[CMake][Fuchsia] Use libunwind as the default unwinder"
This reverts commit 6213dba19f since
this broke Fuchsia builders.
2022-07-02 04:51:16 +00:00
Petr Hosek 6213dba19f [CMake][Fuchsia] Use libunwind as the default unwinder
Fuchsia already uses libunwind, but it does so implicitly via libc++.
This change makes the unwinder choice explicit.

Differential Revision: https://reviews.llvm.org/D127887
2022-07-01 17:24:00 +00:00
Petr Hosek 18a1fc8459 [CMake][compiler-rt] Provide a dedicated option for LLVM unwinder
This allows configuring LLVM unwinder separately from the C++ library
matching how we configure it in libcxx.

This also applies changes made to libunwind+libcxxabi+libcxx in D113253
to compiler-rt.

Differential Revision: https://reviews.llvm.org/D115674
2022-06-14 17:26:25 +00:00
Petr Hosek e64722f686 [CMake][Fuchsia] Build runtimes as universal libraries on OS X
We want to build libunwind, libc++abi and libc++ as universal libraries
supporting both x86_64 and arm64 architectures.

Differential Revision: https://reviews.llvm.org/D125908
2022-05-18 18:14:42 +00:00
Petr Hosek 534f660420 [CMake] Disable libedit in Fuchsia toolchain
We don't need libedit in our toolchain build.

Differential Revision: https://reviews.llvm.org/D125570
2022-05-13 10:47:12 -07:00
Louis Dionne a80e65e00a [libc++] Overhaul how we select the ABI library
This patch overhauls how we pick up the ABI library. Instead of setting
ad-hoc flags, it creates interface targets that can be linked against by
the rest of the build, which is easier to follow and extend to support
new ABI libraries.

This is intended to be a NFC change, however there are some additional
simplifications and improvements we can make in the future that would
require a slight behavior change.

Differential Revision: https://reviews.llvm.org/D120727
2022-05-13 08:32:09 -04:00
Petr Hosek 57636c2590 [CMake] Include llvm-debuginfod-find in Fuchsia toolchain
Differential Revision: https://reviews.llvm.org/D125082
2022-05-06 16:55:05 -07:00
Chris Bieneman 5e096ce6c8 Update PGO and 3-stage cache files
These files are out of date and haven't been updated to work within the
monorepo. This change updates them appropriately so that they build
using the monorepo build infrastructure.
2022-04-27 14:41:56 -05:00
Vladimir Vereschaka 8e4cd7295c [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC.
Use default test configuration file for the libunwind tests.
2022-04-25 17:44:35 -07:00
Petr Hosek af21445ea8 [CMake][Fuchsia] Include find-all-symbols in the distribution
This is needed to use clang-include-fixer.

Differential Revision: https://reviews.llvm.org/D124053
2022-04-19 19:27:46 -07:00
Chris Bieneman b870620c29 [NFC] Add CMake cache file for HLSL
This just adds a trivial CMake cache file (which will grow over time)
to handle the common build configuration for the HLSL compiler.
2022-04-13 11:28:18 -05:00
Petr Hosek ff78d25b8e [CMake][Fuchsia] Include bolt
We would like to use bolt with Fuchsia toolchain.

Differential Revision: https://reviews.llvm.org/D123280
2022-04-06 22:48:17 -07:00
Petr Hosek abe997bb2d [CMake][Fuchsia] Switch to lld on Apple platforms
lld Mach-O backend supports all our use cases now.

Differential Revision: https://reviews.llvm.org/D122047
2022-03-22 01:06:30 -07:00
Vladimir Vereschaka 41f74bc7ae [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC.
* fixed remote test script arguments for libc++/compiler-rt libraries.
* disabled shared libc++abi libraries (to let remote tests get passed).
2022-03-18 21:39:02 -07:00
Petr Hosek a014cb8650 [CMake][Fuchsia] Drop Darwin architectures
We want to build all available ones.

Differential Revision: https://reviews.llvm.org/D122022
2022-03-18 10:09:57 -07:00
Petr Hosek 0f9a855e7c [CMake][Fuchsia] Include llvm-undname
This is useful when developing on Windows.

Differential Revision: https://reviews.llvm.org/D122021
2022-03-18 10:09:13 -07:00
Petr Hosek 67f53708b2 Revert "[CMake][Fuchsia] Use correct architecture for iossim"
This reverts commit 1b6ff3f4f8 since
it broke Fuchsia's macOS builders.
2022-03-16 10:10:15 -07:00
Petr Hosek 1b6ff3f4f8 [CMake][Fuchsia] Use correct architecture for iossim
We should be building iossim for x86_64, not arm64.

Differential Revision: https://reviews.llvm.org/D121659
2022-03-14 19:21:09 -07:00
Vladimir Vereschaka d860ac5da6 [CMake] Replace `TARGET_TRIPLE` with `TOOLCHAIN_TARGET_TRIPLE` for Win-to-Arm cross toolchain cache file. NFC.
Avoid using TARGET_TRIPLE argument for the cross toolchain cmake cache file and replace it
with TOOLCHAIN_TARGET_TRIPLE.

Reference: https://reviews.llvm.org/D119918

Differential Revision: https://reviews.llvm.org/D121029
2022-03-04 16:39:28 -08:00
Vladimir Vereschaka 19c1b084a7 [CMake] Update cache file for Win to ARM cross tooolchain. NFC.
Removed passing CMAKE_AR from the library configurations.
2022-03-03 14:32:16 -08:00
Vladimir Vereschaka 18fa0b15cc [CMake] Use CMAKE_SYSROOT to build libs for Win to ARM cross tooolchain. NFC.
Provide CMAKE_SYSROOT for the libc++/libc++abi/libunwind libraries
instead of specific <foo>_SYSROOT for each of them.

Fixed passing some CMake arguments for the runtimes.

Referenced Differentials:
 * https://reviews.llvm.org/D119836
 * https://reviews.llvm.org/D112155
 * https://reviews.llvm.org/D111672

Differential Revision: https://reviews.llvm.org/D120383
2022-02-23 15:16:56 -08:00
Petr Hosek eec3488cf1 [CMake][Fuchsia] Disable assertions and analyzer for stage 1
We don't need these in the first stage compiler and disabling these
helps a bit with the compile time and runtime performance.

Differential Revision: https://reviews.llvm.org/D120280
2022-02-21 13:31:13 -08:00
Petr Hosek 792a4095c5 [CMake][Fuchsia] Only build iossim runtimes for arm64
x86_64 isn't supported with the recent Xcode SDK.
2022-01-27 02:28:13 -08:00
Petr Hosek 2fcdd685bd [CMake][Fuchsia] Drop 32-bit ios runtimes
These are no longer supported in the recent Xcode SDK versions.

Differential Revision: https://reviews.llvm.org/D118306
2022-01-26 18:57:21 -08:00
Petr Hosek c39d22d196 [CMake] Set sanitizer test C++ library on Linux
We always want to use the in-tree libc++ for tests.

Differential Revision: https://reviews.llvm.org/D118161
2022-01-25 11:09:48 -08:00
Petr Hosek fe0c5309c4 [Fuchsia] Remove i386 from iossim architectures
This is no longer supported in newer SDK versions.

Differential Revision: https://reviews.llvm.org/D118075
2022-01-24 14:48:47 -08:00
Alexandre Ganea aba5b91b69 Re-land [CodeView] Add full repro to LF_BUILDINFO record
This patch writes the full -cc1 command into the resulting .OBJ, like MSVC does. This allows for external tools (Recode, Live++) to rebuild a source file without any external dependency but the .OBJ itself (other than the compiler) and without knowledge of the build system.

The LF_BUILDINFO record stores a full path to the compiler, the PWD (CWD at program startup), a relative or absolute path to the source, and the full CC1 command line. The stored command line is self-standing (does not depend on the environment). In the same way, MSVC doesn't exactly store the provided command-line, but an expanded version (a somehow equivalent of CC1) which is also self-standing.

For more information see PR36198 and D43002.

Differential Revision: https://reviews.llvm.org/D80833
2022-01-19 19:44:37 -05:00
Petr Hosek 8df26e7b4a [Fuchsia][CMake] Don't set libcxxabi and libunwind variables on Windows
We don't build libcxxabi and libunwind for Windows so don't set the
corresponding variables to avoid configuration errors.

Differential Revision: https://reviews.llvm.org/D113729
2021-11-11 19:29:39 -08:00
Vladimir Vereschaka efa5cadcf7 [CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC
Workaround to fix broken remote execution for the libunwind tests.

https://reviews.llvm.org/D112082
2021-10-29 18:55:49 -07:00
Ben Langmuir b8da594750 Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms
Reapply 5692ed0cce, but with the ORC runtime disabled explicitly on
CrossWinToARMLinux to match the other compiler-rt runtime libraries.

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

---

Enable building the ORC runtime for 64-bit and 32-bit ARM architectures,
and for all Darwin embedded platforms (iOS, tvOS, and watchOS). This
covers building the cross-platform code, but does not add TLV runtime
support for the new architectures, which can be added independently.

Incidentally, stop building the Mach-O TLS support file unnecessarily on
other platforms.

Differential Revision: https://reviews.llvm.org/D112111
2021-10-21 09:00:18 -07:00
Petr Hosek ebcfd3ae8c [CMake] Include llvm-libtool-darwin in Fuchsia toolchain
We want to use this tool in our build.

Differential Revision: https://reviews.llvm.org/D111366
2021-10-07 16:44:40 -07:00
Leonard Chan 976aa4d759 Reland "[clang][Fuchsia] Re-enable compiler-rt tests in runtimes build"
This reverts commit a625fd26ce.

Round 3: The scudo test was addressed in
6727832c32.
2021-10-07 14:19:29 -07:00
Leonard Chan a625fd26ce Revert "Reland "[clang][Fuchsia] Re-enable compiler-rt tests in runtimes build""
This reverts commit c52d60ec3b.

The failing scudo test came up again.
2021-10-06 15:09:40 -07:00
Leonard Chan c7e72784ae [clang][Fuchsia] Add -static-libgcc to TSAN tests
This will ensure that tsan tests are built with the built libunwind.a
rather than the host libunwind.so.
2021-10-06 14:01:39 -07:00
Leonard Chan c52d60ec3b Reland "[clang][Fuchsia] Re-enable compiler-rt tests in runtimes build"
This reverts commit 95f824ad7c.

We should've addressed the remaining issues on our CI builders.
2021-10-06 13:57:24 -07:00
Leonard Chan 95f824ad7c Revert "[clang][Fuchsia] Re-enable compiler-rt tests in runtimes build"
This reverts commit 8480063f25.

We're seeing some test failures on our builders.
2021-10-04 16:11:43 -07:00
Leonard Chan 8480063f25 [clang][Fuchsia] Re-enable compiler-rt tests in runtimes build
Differential Revision: https://reviews.llvm.org/D110778
2021-10-04 14:11:49 -07:00
Leonard Chan 78f7ad5a83 [clang][Fuchsia] Remove COMPILER_RT_CAN_EXECUTE_TESTS
I forgot that we run `check-runtimes-x86_64-unknown-linux-gnu`, which
will run all compiler-rt tests also even though we are currently not in
a state where we can run them all yet. Remove this for now to fix our CI
builders.
2021-09-08 15:52:02 -07:00
Leonard Chan e5673564a0 [compiler-rt][Fuchsia] Support building + running compiler-rt tests on fuchsia's host toolchain
Differential Revision: https://reviews.llvm.org/D109199
2021-09-08 11:32:11 -07:00
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