2010-10-28 14:38:35 +00:00
|
|
|
add_custom_target(UnitTests)
|
2022-05-16 16:50:49 -07:00
|
|
|
set_target_properties(UnitTests PROPERTIES FOLDER "Tests/UnitTests")
|
2010-10-28 14:38:35 +00:00
|
|
|
|
2012-06-21 05:16:58 +00:00
|
|
|
function(add_llvm_unittest test_dirname)
|
|
|
|
add_unittest(UnitTests ${test_dirname} ${ARGN})
|
|
|
|
endfunction()
|
2018-09-14 17:34:46 +00:00
|
|
|
function(add_llvm_unittest_with_input_files test_dirname)
|
|
|
|
add_unittest_with_input_files(UnitTests ${test_dirname} ${ARGN})
|
|
|
|
endfunction()
|
2010-12-07 10:22:07 +00:00
|
|
|
|
CMake: Make most target symbols hidden by default
Summary:
For builds with LLVM_BUILD_LLVM_DYLIB=ON and BUILD_SHARED_LIBS=OFF
this change makes all symbols in the target specific libraries hidden
by default.
A new macro called LLVM_EXTERNAL_VISIBILITY has been added to mark symbols in these
libraries public, which is mainly needed for the definitions of the
LLVMInitialize* functions.
This patch reduces the number of public symbols in libLLVM.so by about
25%. This should improve load times for the dynamic library and also
make abi checker tools, like abidiff require less memory when analyzing
libLLVM.so
One side-effect of this change is that for builds with
LLVM_BUILD_LLVM_DYLIB=ON and LLVM_LINK_LLVM_DYLIB=ON some unittests that
access symbols that are no longer public will need to be statically linked.
Before and after public symbol counts (using gcc 8.2.1, ld.bfd 2.31.1):
nm before/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
36221
nm after/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
26278
Reviewers: chandlerc, beanz, mgorny, rnk, hans
Reviewed By: rnk, hans
Subscribers: merge_guards_bot, luismarques, smeenai, ldionne, lenary, s.egerton, pzheng, sameer.abuasal, MaskRay, wuzish, echristo, Jim, hiraditya, michaelplatings, chapuni, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, mgrang, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, kristina, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D54439
2020-01-14 19:15:07 -08:00
|
|
|
# The target unittests may test APIs that aren't exported in libLLVM.so, so
|
|
|
|
# we need to always link against the static libraries.
|
|
|
|
function(add_llvm_target_unittest test_dir_name)
|
|
|
|
add_llvm_unittest(${test_dir_name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
|
|
|
|
endfunction()
|
|
|
|
|
2012-06-21 09:51:26 +00:00
|
|
|
add_subdirectory(ADT)
|
|
|
|
add_subdirectory(Analysis)
|
2015-05-20 20:41:27 +00:00
|
|
|
add_subdirectory(AsmParser)
|
2018-05-14 18:23:05 +00:00
|
|
|
add_subdirectory(BinaryFormat)
|
2012-06-21 09:51:26 +00:00
|
|
|
add_subdirectory(Bitcode)
|
2019-07-03 22:40:07 +00:00
|
|
|
add_subdirectory(Bitstream)
|
2013-09-03 21:57:57 +00:00
|
|
|
add_subdirectory(CodeGen)
|
2013-09-03 20:51:14 +00:00
|
|
|
add_subdirectory(DebugInfo)
|
2021-12-06 21:46:22 +00:00
|
|
|
add_subdirectory(Debuginfod)
|
2018-04-12 20:41:38 +00:00
|
|
|
add_subdirectory(Demangle)
|
2023-01-20 15:43:11 +01:00
|
|
|
add_subdirectory(DWARFLinkerParallel)
|
2013-09-03 20:51:14 +00:00
|
|
|
add_subdirectory(ExecutionEngine)
|
2020-09-01 13:21:18 +02:00
|
|
|
add_subdirectory(FileCheck)
|
[OpenMP] Introduce the OpenMP-IR-Builder
This is the initial patch for the OpenMP-IR-Builder, as discussed on the
mailing list ([1] and later) and at the US Dev Meeting'19.
The design is similar to D61953 but:
- in a non-WIP status, with proper documentation and working.
- using a OpenMPKinds.def file to manage lists of directives, runtime
functions, types, ..., similar to the current Clang implementation.
- restricted to handle only (simple) barriers, to implement most
`#pragma omp barrier` directives and most implicit barriers.
- properly hooked into Clang to be used if possible (D69922).
- compatible with the remaining code generation.
Parts have been extracted into D69853.
The plan is to have multiple people working on moving logic from Clang
here once the initial scaffolding (=this patch) landed.
[1] http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/2019-May/000197.html
Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim
Subscribers: mgorny, hiraditya, bollu, guansong, jfb, cfe-commits, llvm-commits, penzn, ppenzin
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D69785
2019-11-05 18:57:44 -06:00
|
|
|
add_subdirectory(Frontend)
|
2017-08-21 22:57:06 +00:00
|
|
|
add_subdirectory(FuzzMutate)
|
2020-08-11 11:44:22 -07:00
|
|
|
add_subdirectory(InterfaceStub)
|
2013-09-03 20:51:14 +00:00
|
|
|
add_subdirectory(IR)
|
2014-01-31 23:46:14 +00:00
|
|
|
add_subdirectory(LineEditor)
|
2014-04-29 15:52:36 +00:00
|
|
|
add_subdirectory(Linker)
|
2013-10-16 18:26:16 +00:00
|
|
|
add_subdirectory(MC)
|
2016-02-18 07:37:17 +00:00
|
|
|
add_subdirectory(MI)
|
2021-05-25 20:20:52 -04:00
|
|
|
add_subdirectory(MIR)
|
2022-02-17 19:04:51 +03:00
|
|
|
add_subdirectory(ObjCopy)
|
2016-11-15 21:07:03 +00:00
|
|
|
add_subdirectory(Object)
|
2016-03-01 19:15:06 +00:00
|
|
|
add_subdirectory(ObjectYAML)
|
2012-12-05 00:29:32 +00:00
|
|
|
add_subdirectory(Option)
|
2019-03-05 20:45:17 +00:00
|
|
|
add_subdirectory(Remarks)
|
2018-04-05 15:04:13 +00:00
|
|
|
add_subdirectory(Passes)
|
2015-02-04 00:15:12 +00:00
|
|
|
add_subdirectory(ProfileData)
|
2012-06-21 09:51:26 +00:00
|
|
|
add_subdirectory(Support)
|
2019-10-03 19:13:39 +00:00
|
|
|
add_subdirectory(TableGen)
|
2019-10-03 11:04:48 +00:00
|
|
|
add_subdirectory(Target)
|
[Support] Move TargetParsers to new component
This is a fairly large changeset, but it can be broken into a few
pieces:
- `llvm/Support/*TargetParser*` are all moved from the LLVM Support
component into a new LLVM Component called "TargetParser". This
potentially enables using tablegen to maintain this information, as
is shown in https://reviews.llvm.org/D137517. This cannot currently
be done, as llvm-tblgen relies on LLVM's Support component.
- This also moves two files from Support which use and depend on
information in the TargetParser:
- `llvm/Support/Host.{h,cpp}` which contains functions for inspecting
the current Host machine for info about it, primarily to support
getting the host triple, but also for `-mcpu=native` support in e.g.
Clang. This is fairly tightly intertwined with the information in
`X86TargetParser.h`, so keeping them in the same component makes
sense.
- `llvm/ADT/Triple.h` and `llvm/Support/Triple.cpp`, which contains
the target triple parser and representation. This is very intertwined
with the Arm target parser, because the arm architecture version
appears in canonical triples on arm platforms.
- I moved the relevant unittests to their own directory.
And so, we end up with a single component that has all the information
about the following, which to me seems like a unified component:
- Triples that LLVM Knows about
- Architecture names and CPUs that LLVM knows about
- CPU detection logic for LLVM
Given this, I have also moved `RISCVISAInfo.h` into this component, as
it seems to me to be part of that same set of functionality.
If you get link errors in your components after this patch, you likely
need to add TargetParser into LLVM_LINK_COMPONENTS in CMake.
Differential Revision: https://reviews.llvm.org/D137838
2022-12-20 10:24:02 +00:00
|
|
|
add_subdirectory(TargetParser)
|
2022-02-28 16:47:29 -08:00
|
|
|
add_subdirectory(Testing)
|
2019-10-03 19:13:39 +00:00
|
|
|
add_subdirectory(TextAPI)
|
2012-06-21 09:51:26 +00:00
|
|
|
add_subdirectory(Transforms)
|
2017-02-10 06:36:08 +00:00
|
|
|
add_subdirectory(XRay)
|
2017-10-11 20:35:01 +00:00
|
|
|
add_subdirectory(tools)
|