Age | Commit message (Collapse) | Author |
|
Clang-cl supports the -gline-tables-only flag, so we were going down
that path. Honestly, we should just go ahead and enable full codeview
support.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330989 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This expands the CMake check to handle both statically and dynamically
linked version of libc++abi and libunwind and matches the implemnetation
used elsewhere in LLVM.
Differential Revision: https://reviews.llvm.org/D45242
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329205 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
For some reason CMake can't find the `append` macro if LLVM is built separately and imported via `LLVM_CONFIG_PATH`.
Patch by Loo Rong Jie
Reviewers: rnk, vitalybuka
Reviewed By: rnk, vitalybuka
Subscribers: dberris, mgorny, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D43458
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@327876 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This also slightly refactors the code that's checking the directory
presence which allows eliminating one unnecessary variable.
Differential Revision: https://reviews.llvm.org/D40637
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320446 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Per beanz, building compiler-rt standalone is a pretty important use
case, so the comment is very out of date.
Differential Revision: https://reviews.llvm.org/D40740
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319570 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
having fvisibility=hidden obviates the need for
fvisibility-inlines-hidden.
Reviewers: cryptoad, weimingz, mgorny, vsk, compnerd, peter.smith, nikhgupt
Reviewed By: vsk, nikhgupt
Subscribers: dberris, mgorny
Differential Revision: https://reviews.llvm.org/D40269
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319257 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Allow user to override shadow scale in compiler_rt by passing
-DCOMPILER_RT_ASAN_SHADOW_SCALE=n to CMake. Propagate the override
shadow scale value via a compiler define to compiler-rt and asan
tests. Tests will use the define to partially disable unsupported
tests. Set "-mllvm -asan-mapping-scale=<n>" for compiler_rt tests.
Differential Revision: https://reviews.llvm.org/D39469
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318038 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Make it possible to control building profile runtime separately from
other options. Before r313549, the profile runtime building was
controlled along with sanitizers. However, since that commit it is built
unconditionally which results in multiple builds for people building
different runtimes separately.
Differential Revision: https://reviews.llvm.org/D38441
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314646 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: compnerd, beanz
Subscribers: srhines, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D38044
Change-Id: Idab521f187aba18977818d91503763e0e9d3aa0e
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313652 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: beanz, compnerd
Reviewed By: compnerd
Subscribers: aemerson, mgorny, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D38045
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313650 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313443 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This is a resubmission of r313270. It broke standalone builds of
compiler-rt because we were not correctly generating the llvm-lit
script in the standalone build directory.
The fixes incorporated here attempt to find llvm/utils/llvm-lit
from the source tree returned by llvm-config. If present, it
will generate llvm-lit into the output directory. Regardless,
the user can specify -DLLVM_EXTERNAL_LIT to point to a specific
lit.py on their file system. This supports the use case of
someone installing lit via a package manager. If it cannot find
a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or
invalid, then we print a warning that tests will not be able
to run.
Differential Revision: https://reviews.llvm.org/D37756
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313407 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This was originally broken by r258744 which introduced a weak reference
from ubsan to ubsan_cxx. This reference does not work directly on
Windows because COFF has no direct concept of weak symbols. The fix is
to use /alternatename to create a weak external reference to ubsan_cxx.
Also fix the definition (and the name, so that we drop cached values)
of the cmake flag that controls whether to build ubsan_cxx. Now the
user-controllable flag is always on, and we turn it off internally
depending on whether we support building it.
Differential Revision: https://reviews.llvm.org/D37882
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313391 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This was intended to be a generic CMake solution to a problem
shared across several projects. It turns out it doesn't interact
very well certain CMake configurations, and furthermore the
"problem" is actually not a problem, as the problematic code
is never executed to begin with. So this really isn't solving
anything.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313191 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Fuchsia's lowest API layer has been renamed from Magenta to Zircon.
Patch by Roland McGrath
Differential Revision: https://reviews.llvm.org/D37770
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313106 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Some projects need to add conditional dependencies on other projects.
compiler-rt is already doing this, and I attempted to add this to
debuginfo-tests when I ran into the ordering problem, that you can't
conditionally add a dependency unless that dependency's CMakeLists.txt
has already been run (which would allow you to say if (TARGET foo).
The solution to this seems to be to determine very early on the entire
set of projects which is enabled. This is complicated by the fact that
there are multiple ways to enable projects, and different tree layouts
(e.g. mono-repo, out of -tree, external, etc). This patch attempts to
centralize all of this into one place, and then updates compiler-rt to
demonstrate as a proof of concept how this can simplify code.
Differential Revision: https://reviews.llvm.org/D37637
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313091 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Resulting library binaries will be named libclang_rt.fuzzer*, and will
be placed in Clang toolchain, allowing redistribution.
Differential Revision: https://reviews.llvm.org/D36908
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311407 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Also add "libc++" to list of property values (AFAIK that only affects the cmake gui).
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310883 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: This is to support Android where libc++abi is part of libc++.
Reviewers: srhines, EricWF
Subscribers: dberris, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D36640
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310769 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
initialization.
Summary:
Define a build-time configuration option for the XRay runtime to
determine whether the archive will add an entry to the `.preinit_array`
section of the binary. We also allow for initializing the XRay data
structures with an explicit call to __xray_init(). This allows us to
give users the capability to initialize the XRay data structures on
demand.
This can allow us to start porting XRay to platforms where
`.preinit_array` isn't a supported section. It also allows us to limit
the effects of XRay in the initialization sequence for applications that
are sensitive to this kind of interference (i.e. large binaries) or
those that want to package XRay control in libraries.
Future changes should allow us to build two different library archives
for the XRay runtime, and allow clang users to determine which version
to link.
Reviewers: dblaikie, kpw, pelikan
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D36080
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309909 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Submitted on behalf of Roland McGrath.
Reviewers: vitalybuka, alekseyshl, kcc
Reviewed By: vitalybuka
Subscribers: cryptoad, srhines, kubamracek, mgorny, phosek, filcab, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D36031
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309756 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Android uses libgcc name even for shared library unlike other platforms
which use libgcc_s. Furthemore, Android libstdc++ has a dependency on
libdl. These need to be handled while performing CMake checks.
Differential Revision: https://reviews.llvm.org/D36035
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309638 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This change adds sanitizer support for LLVM's libunwind and libc++abi
as an alternative to libstdc++. This allows using the in tree version
of libunwind and libc++abi which is useful when building a toolchain
for different target.
Differential Revision: https://reviews.llvm.org/D34501
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309362 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This change adds support for compiler-rt builtins as an alternative
compiler runtime to libgcc.
Differential Revision: https://reviews.llvm.org/D35165
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309361 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch addresses two issues:
Most of the time, hacks with `if/else` in order to get support for
multi-configuration builds are superfluous.
The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it
expands to `.` on all single-configuration builds, and to a configuration
name otherwise.
The `if/else` hacks for the library name generation should also not be
done, as CMake has `TARGET_FILE` generator expression precisely for this
purpose, as it expands to the exact filename of the resulting target.
Differential Revision: https://reviews.llvm.org/D35952
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309341 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit fd63314d6770e0da62572a3fea2c41c4cc0fc58a.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309083 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit d1997bff31cf6b484eb59c2ee1fc3155442e338c.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309082 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This change adds sanitizer support for LLVM's libunwind and libc++abi
as an alternative to libstdc++. This allows using the in tree version
of libunwind and libc++abi which is useful when building a toolchain
for different target.
Differential Revision: https://reviews.llvm.org/D34501
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309074 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This change adds support for compiler-rt builtins as an alternative
compiler runtime to libgcc.
Differential Revision: https://reviews.llvm.org/D35165
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309060 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
says so
Differential Revision: https://reviews.llvm.org/D35400
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308072 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307448 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Since r298413, the NEW behavior of the CMake policy CMP0056 is followed.
However, it is only effective after the call to cmake_minimum_required.
This causes CMAKE_EXE_LINKER_FLAGS etc. to be unused when CMake tries to
check compilers for languages specified in the 'project' declaration.
Set cmake_minimum_required(VERSION) at the top of the file and ahead of
the project declaration.
Reviewers: beanz
Subscribers: mgorny, srhines, llvm-commits
Differential Revision: https://reviews.llvm.org/D34282
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@305593 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Monorepo version!
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304716 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Disable building enable_execute_stack.c for targets that do not have
support for mprotect().
Differential Revision: https://reviews.llvm.org/D33018
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302680 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302541 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
On Darwin, we're having multiple issues with using -fomit-frame-pointer in the AddressSanitizer and ThreadSanitizer runtimes, so we're actually not using -fomit-frame-pointer in the our builds of the sanitizer dylibs. This patch just pushes our internal change upstream.
The issues are usually with debuggers, profilers and other tools that unwind the stack (crash reporter), which are often simply not able to get a stack trace. And crashlogs that don't contain a stack trace are a huge problem.
Differential Revision: https://reviews.llvm.org/D31376
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298859 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Only depend on LLD if it is going to be built.
Re-land of r298174 which got reverted in r298287.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298753 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: check_cxx_compiler_flag and check_library_exists could fail because they ignored CMAKE_EXE_LINKER_FLAGS and therefore would always fail to produce executables. Cmake policy CMP0056 fixes this, but was explicitly set to OLD in our CMakeLists because it caused problems with test_target_arch. This change sets the policy to NEW to fix the problem with the compiler and library tests, and temporarily clears CMAKE_EXE_LINKER_FLAGS inside test_target_arch to emulate the old behavior there. This allows, for example, LTO builds that require lld to succeed.
Reviewers: davidxl, beanz
Reviewed By: beanz
Subscribers: fjricci, dberris, mgorny, mehdi_amini, tejohnson, rnk, llvm-commits
Differential Revision: https://reviews.llvm.org/D31098
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298413 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Revert "Fix sanitizer tests with LLVM_TOOL_LLD_BUILD=OFF."
Revert "[asan] Remove gc-sections test with bfd."
Revert "[asan] Disable globals-gc test with ld.bfd."
Revert "[asan] Fix dead stripping of globals on Linux (compiler-rt)"
OOM in gold linker.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298287 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Only depend on LLD if it is going to be built.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298174 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
For a reason that hasn't been investigated for lack of powerpc knowledge and
hardware, -fno-function-sections is required for the Sanitizers to work
properly on powerpc64le. Without, the function-sections-are-bad test fails on
that architecture (and that architecture only).
This patch re-enables the flag in the powerpc64le cflags.
I have to admit I am not entirely sure if my way is the proper way to do this,
so if anyone has a better way, I'll be happy to oblige.
Reviewers: kcc, eugenis
Reviewed By: eugenis
Subscribers: nemanjai, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D29285
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293558 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
-fno-function-sections was added as a default Sanitizer common cflag with
https://reviews.llvm.org/rL200683, the reasoning behind was that things would
break if linked with --gc-sections.
This appears to not be necessary anymore, as tests pass without, including
function-sections-are-bad.cc. There is a large benefit to having
function-sections when dealing with static libraries in terms of size and
dependencies that go away with --gc-sections.
Reviewers: kcc, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D29132
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293220 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
We put empty object files in archives, which causes MSVC's linker to
complain about these objects not defining any previously undefined
symbols. Since we do it on purpose, this only creates noise during
the build process. This patch causes us to suppress the warnings.
Reviewers: rnk, samsonov
Subscribers: dberris, mgorny
Differential Revision: https://reviews.llvm.org/D28262
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291011 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
LLVM_ENABLE_MODULES=On
Sanitizers are intentionally not including system headers and often declare slightly different function prototypes, which is incompatible with -fmodules and -fcxx-modules. Let’s simply exclude compiler-rt from using -fmodules.
Differential Revision: https://reviews.llvm.org/D25230
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@283658 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: https://reviews.llvm.org/D24990
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@283466 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: This flag doesn't make sense on Windows systems.
Reviewers: beanz, kubabrecka, compnerd
Subscribers: dberris, llvm-commits, beanz
Differential Revision: https://reviews.llvm.org/D24320
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280953 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Allow for use of cxxabi to be disabled from cmake.
This will make sanitizers usable when c++ abi is unavailable.
Reviewers: pcc, rnk, samsonov, beanz, compnerd
Subscribers: llvm-commits, compnerd, dberris
Differential Revision: https://reviews.llvm.org/D23639
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@279451 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
When compiler-rt's CMake is not directly invoked, it will currently not call
project() and thus ASM will not be enabled.
We also don't need to put the .S files through the C compiler then.
Differential Revision: https://reviews.llvm.org/D23656
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@279215 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
configuration"
This reverts commit dbb6e905684e2e9488887b26c02ee8881849f09f.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278852 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: This will allow for the sanitizers to be used when c++ abi is unavailable.
Reviewers: samsonov, beanz, pcc, rnk
Subscribers: llvm-commits, kubabrecka, compnerd, dberris
Differential Revision: https://reviews.llvm.org/D23376
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@278848 91177308-0d34-0410-b5e6-96231b3b80d8
|