Commit Graph

170 Commits

Author SHA1 Message Date
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
Serge Guelton b4ffc40d62 Update documentation and implementation of stage3 build
Have the build work out of the box by forcing an LLD build.

That way, we don't require an external LTO-aware linker,
as we build one.

Also remove reference to the seemingly dead builder.

Differential Revision: https://reviews.llvm.org/D88990
2020-10-08 07:55:37 +02:00
Petr Hosek de47e7122f [CMake][Fuchsia] Don't set WIN32 API, rely on autodetection
We prefer autodetection here to avoid persisting this configuration
in the generated __config header which is shared across targets.

Differential Revision: https://reviews.llvm.org/D88694
2020-10-01 12:35:52 -07:00
Nico Weber 33c9dbbd38 Add an explicit toggle for the static analyzer in clang-tidy
Instead of using CLANG_ENABLE_STATIC_ANALYZER for use of the
static analyzer in both clang and clang-tidy, add a second
toggle CLANG_TIDY_ENABLE_STATIC_ANALYZER.

This allows enabling the static analyzer in clang-tidy while
disabling it in clang.

Differential Revison: https://reviews.llvm.org/D87118
2020-09-10 10:48:17 -04:00
Alexandre Ganea 98e01f56b0 Revert "Re-Re-land: [CodeView] Add full repro to LF_BUILDINFO record"
This reverts commit a3036b3863.

As requested in: https://reviews.llvm.org/D80833#2221866
Bug report: https://crbug.com/1117026
2020-08-17 15:49:18 -04:00
Alexandre Ganea a3036b3863 Re-Re-land: [CodeView] Add full repro to LF_BUILDINFO record
This patch adds the missing information to the LF_BUILDINFO record, which allows for rebuilding a .CPP without any external dependency but the .OBJ itself (other than the compiler).

Some external tools that we are using (Recode, Live++) are extracting the information to reproduce a build without any knowledge of the build system. The LF_BUILDINFO stores a full path to the compiler, the PWD (CWD at program startup), a relative or absolute path to the TU, and the full CC1 command line. The command line needs to be freestanding (not depend on any environment variables). In the same way, MSVC doesn't store the provided command-line, but an expanded version (somehow their equivalent of CC1) which is also freestanding.

For more information see PR36198 and D43002.

Differential Revision: https://reviews.llvm.org/D80833
2020-08-10 13:36:30 -04:00
Petr Hosek 3ff7dcded2 [CMake][Fuchsia] Include additional tools in the toolchain
These are needed on Windows.

Differential Revision: https://reviews.llvm.org/D83999
2020-07-30 13:08:02 -07:00
Alexandre Ganea b71499ac9e Revert "Re-land [CodeView] Add full repro to LF_BUILDINFO record"
This reverts commit add59ecb34 and 41d2813a5f.
2020-07-10 19:46:16 -04:00
Alexandre Ganea 41d2813a5f [PDB] Attempt fix for debug-info-codeview-buildinfo.c test
This is a bit a shot in the dark, as it doesn't occur on my Windows 10 machines, nor on x64 Linux Ubuntu 18.04.
This patch tries to fix the following kind of error:
- http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/31511/steps/cmake%20stage%201/logs/stdio
- http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/25150/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Adebug-info-codeview-buildinfo.c
- http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/7947/steps/check/logs/stdio
2020-07-10 18:52:52 -04:00
Petr Hosek ceb76d2fe7 [CMake][Fuchsia] Move runtimes to outer scope
This is needed for runtimes to be properly configured, addressing an
issue introduced in 53e38c85.
2020-07-09 21:07:44 -07:00
Petr Hosek 53e38c85a8 [CMake][Fuchsia] Support for building with MSVC
This change adds the necessary flags for building the full Fuchsia
toolchain on Windows with MSVC.

Differential Revision: https://reviews.llvm.org/D73810
2020-07-09 13:07:12 -07:00
Petr Hosek a378c04495 [Fuchsia] Set projects and runtimes in the cache file
We make assumptions about what projects and runtimes are enabled
when configuring our toolchain build, so we should enable those in
the cache file as well rather than relying on those being set
externally.

Differential Revision: https://reviews.llvm.org/D81514
2020-07-05 14:48:52 -07:00
Sergej Jaskiewicz c310d0de39 [cmake] Invoke ssh.py using Python interpreter, not as executable in CrossWinToARMLinux.cmake
The issue is that Windows doesn't support shebangs. This caused issues
with libc++ tests.
2020-06-15 23:59:06 +03:00
Vladimir Vereschaka f8d87ce9ca [CMake] Use 'ssh.py' executor to run the remote library tests.
In order to support the libcxx new format changes SSHExecutor was
replaced with ssh.py script in the following way:

LIBxxx_EXECUTOR="<llvm-root>/libcxx/utils/ssh.py --host <username>@<host>"

See 96e6cbbf94 commit for details.
2020-06-12 12:31:59 -07:00
Alex Lorenz 5eedf07ab9 [apple clang] disable in-process CC1 to preserve crashlog compatibility
The in-process CC1 currently doesn't interoperate with the macOS crash analytics,
which we would like to keep enabled for Apple clang. This commit restores the
out-of-process CC1 to the Apple clang CMake configuration for now.

Differential Revision: https://reviews.llvm.org/D80849
2020-06-05 10:55:42 -07:00
Sergej Jaskiewicz 3873d0b3d8 Re-commit "[cmake] Allow std::filesystem tests in CrossWinToARMLinux.cmake"
https://reviews.llvm.org/D78200 has been re-committed, so we can now
enable building std::filesystem and running tests for it.
2020-05-25 19:14:54 +03:00
Leonard Chan 592303a53e [Fuchsia] Do not enable the Z3 solver for a fuchsia toolchain
gLinux started shipping incompatible versions of Z3, which can lead to a
missing `z3.h` header when building the Z3 solver locally. This patch
disables the Z3 solver when building a clang toolchain for Fuchsia.

Differential Revision: https://reviews.llvm.org/D79974
2020-05-14 17:03:58 -07:00
Sergej Jaskiewicz ddfe58822e Revert "[cmake] Allow std::filesystem tests in CrossWinToARMLinux.cmake"
This reverts commit 67175d8dc5.

https://reviews.llvm.org/D78200 has been reverted, so our bot is red.
Make it green by turning off std::filesystem.
2020-05-07 15:01:39 +03:00
Sergej Jaskiewicz 67175d8dc5 [cmake] Allow std::filesystem tests in CrossWinToARMLinux.cmake
Now that https://reviews.llvm.org/D78200 has landed, there should be
no problem with those tests. If there is, it is OK to revert this.
2020-05-06 01:31:32 +03:00
Petr Hosek 063128f979 [Fuchsia] Build compiler-rt builtins for 32-bit x86
While we don't support 32-bit architectures in Fuchsia, these are needed
in the early boot phase on x86, so we build just these to satisfy that
use case.

Differential Revision: https://reviews.llvm.org/D78687
2020-04-24 12:18:30 -07:00
Sergej Jaskiewicz 7ce4e65231 [cmake] Temporarily disable building std::filesystem in CrossWinToARMLinux.cmake 2020-04-18 00:29:44 +03:00
Sergej Jaskiewicz 9a6a696817 [cmake] Link libc++ tests against static libc++/libc++abi in CrossWinToARMLinux.cmake
Summary: Now that D72687 has landed, we can enable this setting in our cache file.

Reviewers: vvereschaka

Reviewed By: vvereschaka

Subscribers: mgorny, kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76774
2020-03-31 23:36:36 +03:00
Petr Hosek 98223f7931 [Fuchsia] Use -ffile-prefix-map
This makes toolchain independent of the path it was built in by
rewriting all absolute paths embedded in sources and debug info
into relative ones.

Differential Revision: https://reviews.llvm.org/D76189
2020-03-19 15:14:15 -07:00
Petr Hosek c682a605eb [Fuchsia] Include llvm-gsymutil tool in the Fuchsia toolchain
This tool is used for generating and manipulating GSYM files.

Differential Revision: https://reviews.llvm.org/D76204
2020-03-18 13:51:47 -07:00
Sergej Jaskiewicz 03993f3b6f [CMake] Explicitly specify paths to libc++abi in CrossWinToARMLinux.cmake
Summary:
D69169, which was necessary for running libc++ tests on remote host, got reverted. I couldn't think of a less invasive way to achieve this behavior but specify libc++abi paths in our cache file.

Reviewers: vvereschaka, aorlov, andreil99, EricWF

Reviewed By: vvereschaka

Subscribers: mgorny, kristof.beyls, ldionne, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74347
2020-03-13 17:58:02 +03:00
Vladimir Vereschaka 828fe7916f Revert "Temporarily re-apply https://reviews.llvm.org/D74347"
This reverts commit 0197eac333.

The changes break Armv7/Aarch64 toolchain builders:
* http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/5570
* http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/5600
2020-03-11 15:00:56 -07:00
Sergej Jaskiewicz 0197eac333 Temporarily re-apply https://reviews.llvm.org/D74347
It was reverted in 35367e06b8
because it broke the buildbot due to missing libc++abi headers.

https://reviews.llvm.org/D75991 improves the diagnostics, so I hope
the build log will be more informative.
2020-03-11 21:35:14 +03:00
Sergej Jaskiewicz 35367e06b8 Revert "[CMake] Explicitly specify paths to libc++abi in CrossWinToARMLinux.cmake"
This reverts commit 801627ee49.
2020-02-17 16:06:30 +03:00
Sergej Jaskiewicz 801627ee49 [CMake] Explicitly specify paths to libc++abi in CrossWinToARMLinux.cmake
Summary:
D69169, which was necessary for running libc++ tests on remote host, got reverted. I couldn't think of a less invasive way to achieve this behavior but specify libc++abi paths in our cache file.

Reviewers: vvereschaka, aorlov, andreil99, EricWF

Reviewed By: vvereschaka

Subscribers: mgorny, kristof.beyls, ldionne, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74347
2020-02-17 15:24:04 +03:00
Petr Hosek 67f4e0011d [CMake][Fuchsia] Enable in-process cc1
This is now supported by Goma so we can re-enable it.
2020-02-12 14:05:24 -08:00
Petr Hosek 635cbef505 [CMake][Fuchsia] Disable in-process cc1
The in-process cc1 currently breaks Goma client and therefore prevents
the use of tip-of-tree Clang with Goma, so we disable the in-process cc1
in our toolchain until this issue is resolved.
2020-01-22 10:11:54 -08:00
Sergej Jaskiewicz 383ff4eac1 [CMake] Use LinuxRemoteTI instead of LinuxLocalTI in CrossWinToARMLinux cmake cache
Summary: Depends on D72847

Reviewers: vvereschaka, aorlov, andreil99

Reviewed By: vvereschaka

Subscribers: mgorny, kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72850
2020-01-18 01:29:09 +03:00
Sergej Jaskiewicz e44dedd363 [CMake] Support running libc++abi tests in CrossWinToARMLinux cache file
Summary:
Now that D71894 has landed, we're able to run libc++abi tests remotely.

For that we can use the same CMake command as before. The tests can be run using `ninja check-cxxabi`.

Reviewers: andreil99, vvereschaka, aorlov

Reviewed By: vvereschaka, aorlov

Subscribers: mgorny, kristof.beyls, ldionne, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72459
2020-01-10 12:59:05 +03:00
Gabor Horvath 0458e63d28 [fuchsia] Enable Clang Static Analyzer
Differential Revision: https://reviews.llvm.org/D72188
2020-01-03 15:49:32 -08:00
Petr Hosek b63bc648a4 [CMake] clang-scan-deps in Fuchsia distribution
We would like to use clang-scan-deps in Fuchsia build so include it
in the toolchain distribution.

Differential Revision: https://reviews.llvm.org/D72113
2020-01-02 16:49:52 -08:00
Vladimir Vereschaka eadc97b0ec [CMake] Added remote test execution support into CrossWinToARMLinux CMake cache file.
Added two confguration argument to provide a host name and SSH user name
to run the tests on the remote target host.

* REMOTE_TEST_HOST  - remote host name or address.
* REMOTE_TEST_USER  - passwordless SSH account name.

Differential Revision: https://reviews.llvm.org/D71625
2019-12-29 20:36:19 -08:00
Petr Hosek 68a3a3b281 [Clang] Enable RISC-V support for Fuchsia
We don't have a full sysroot yet, so for now we only include compiler
support and compiler-rt builtins, the rest of the runtimes will get
enabled later.

Differential Revision: https://reviews.llvm.org/D70477
2019-11-21 16:02:26 -08:00
Vladimir Vereschaka 0f5aabb91a [CMake] Fix the path to CrossWinToARMLinux.cmake CMake cache.
The comment was slightly misleading.

Behalf: broadwaylamb (Sergej Jaskiewicz)

Differential Revision: https://reviews.llvm.org/D70499
2019-11-20 12:51:52 -08:00
Vladimir Vereschaka a264e85dd9 [CMake] Add cross Windows to ARM Linux toolchain CMake cache file.
This cache file can be used to build a cross Windows to ARM Linux
toolchain.

Differential Revision: https://reviews.llvm.org/D69651
2019-11-01 12:40:25 -07:00
Petr Hosek 7fff716ec4 [CMake] Update Fuchsia build configuration
This includes several changes to our toolchain build:
- Switch from RelWithDebInfo to Release as we don't currently use the
  debug info and therefore don't need to produce it.
- Disable unwind tables since we don't need them.
- Disable Clang static analyzer and ARCMT since we don't use it.
- Disable Go tests since we don't distribute Go bindings.
- Set the deployment target for macOS to 10.7 to make the toolchain
  usable on older systems.
- Restrict the targets we build runtimes for on Darwin only the ones
  we actually need.
- Drop llc and opt from the distribution since we don't need them.

Differential Revision: https://reviews.llvm.org/D69415
2019-10-24 16:35:29 -07:00
Petr Hosek 864fd44d8f [CMake][Fuchsia] Enable experimental pass manager by default
We plan on using experimental new pass manager for Fuchsia toolchain.

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

llvm-svn: 370421
2019-08-29 23:12:06 +00:00
Petr Hosek 20d34eacf3 [CMake][Fuchsia] Define asan+noexcept multilib
Using noexcept multilib with -fno-exceptions can lead to significant
space savings when statically linking libc++abi because we don't need
all the unwinding and demangling code.

When compiling with ASan, we already get a lot of overhead from the
instrumentation itself, when statically linking libc++abi, that overhead
is even larger.

Having the noexcept variant for ASan can help significantly, we've seen
more than 50% size reduction in our system image, which offsets the cost
of having to build another multilib.

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

llvm-svn: 365994
2019-07-13 08:07:10 +00:00
Petr Hosek 803b994e9a [CMake][Fuchsia] Use RelWithDebInfo to build runtimes
We want to preserve debug info in our runtimes to aid symbolization and
debugging; for shared libraries this will be stripped away during
install-stripped step and distributed via .build-id, for static archives
it's part of the archive and it's a responsibility of the consumer to
strip it away in the final binary if not needed.

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

llvm-svn: 365845
2019-07-11 23:49:39 +00:00
Chris Bieneman b67cb3cda0 Use LTO capable linker
Summary:
In DistributionExample.cmake be sure we use a LTO
capable linker, the easiest to choose is lld.

Reviewers: beanz

Reviewed By: beanz

Patch By: winksaville

Subscribers: mgorny, mehdi_amini, inglorion, dexonsmith, cfe-commits

Tags: #clang

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

llvm-svn: 362624
2019-06-05 17:35:38 +00:00
Petr Hosek 9d8d0f68fb [CMake][Fuchsia] Use libc++ ABIv2 for the first stage build
This also unifies flags between macOS and Linux builds.

llvm-svn: 362585
2019-06-05 06:58:41 +00:00
Petr Hosek 2ab7af29c6 [CMake] Provide an option to use relative paths in debug info
CMake always uses absolute file paths in the generated compiler
invocation which results in absolute file paths being embedded in debug
info. This is undesirable when building a toolchain e.g. on bots as the
debug info may embed the bot source checkout path which is meaningless
anywhere else.

This change introduces the LLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO which uses
-fdebug-prefix-map (where supported) options to rewrite paths embedded
into debug info with relative ones. Additionally, LLVM_SOURCE_PREFIX can
be used to override the path to source directory with a different one.

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

llvm-svn: 362185
2019-05-31 01:34:51 +00:00