1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

128 Commits

Author SHA1 Message Date
Nathan Sidwell
b3363eeab8 [docs] Collate CMake options
I found the documentation of the various CMake variables difficult to
navigate, because they are unsorted. I can see they've grown
organically with new clusters of somewhat-related options, but the
result is hard to use. This collates them (treating '_' as space).

Differential Revision: https://reviews.llvm.org/D102481
2021-06-09 11:24:38 -07:00
Martin Storsjö
77c89471fd [docs] [CMake] Change recommendations for how to use LLVM_DEFINITIONS
LLVM_DEFINITIONS is a string variable containing a list of arguments
to pass to the compiler. When CMake's add_definitions is passed a
string variable, this is interpreted as one argument. To make it
behave properly, the string variable needs to be split into a list.

Despite the fact that add_definitions isn't supposed to be used like
the LLVM docs recommended, it worked fine in practice in many cases.
If the first argument in LLVM_DEFINITIONS is of the form -DFOO=42
instead of plain -DFOO, the rest of the string is treated as value
to this define. I.e. if LLVM_DEFINITIONS consists of `-DFOO=42 -DBAR`,
CMake ended up passing `-DFOO="42 -DBAR"` to the compiler.

See https://gitlab.kitware.com/cmake/cmakissues/22162
for discussion on the matter.

Changing LLVM_DEFINITIONS to be a list variable would possibly be
more disruptive; instead keep the variable defined as before but
change the recommendation for how to use it. Then projects using it
can gradually be updated to follow the new recommendation.

Differential Revision: https://reviews.llvm.org/D103044
2021-05-25 22:56:51 +03:00
xgupta
e9c576eeca [Docs] Mention LLVM_EXPERIMENTAL_TARGETS_TO_BUILD variable in CMake.rst
Beginners might not aware of this variable and wanted to try a new experimental target.

Although this variable mention in Writing a Backend Documentation. But it becomes easy to search when listed in cmake.rst doc where most variables are listed.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D100729
2021-04-20 09:27:57 +05:30
Vedant Kumar
54baa09ec4 [cmake] Add LLVM_UBSAN_FLAGS, to allow overriding UBSan flags
Allow overriding the default set of flags used to enable UBSan when
building llvm.

This can be used to test new checks or opt out of certain checks.

Differential Revision: https://reviews.llvm.org/D89439
2020-10-26 15:48:19 -07:00
Dave Lee
2be90dca65 [docs] Document LLVM_EXTERNALIZE_DEBUGINFO CMake option
Add `LLVM_EXTERNALIZE_DEBUGINFO` to CMake.rst. This should help make dSYM
generation more discoverable.

Differential Revision: https://reviews.llvm.org/D87591
2020-09-13 21:39:27 -07:00
Guillaume Chatelet
1b36883d0d Fix broken link for Sphinx installation 2020-09-10 12:27:49 +00:00
Alexandre Ganea
4be21d8696 Fix sphinx documentation after a6a37a2fcd2a8048a75bd0d8280497ed89d73224 2020-08-31 08:06:13 -04:00
Alexandre Ganea
1c64f56c35 [Support] On Windows, add optional support for {rpmalloc|snmalloc|mimalloc}
This patch optionally replaces the CRT allocator (i.e., malloc and free) with rpmalloc (mixed public domain licence/MIT licence) or snmalloc (MIT licence) or mimalloc (MIT licence). Please note that the source code for these allocators must be available outside of LLVM's tree.

To enable, use `cmake ... -DLLVM_INTEGRATED_CRT_ALLOC=D:/git/rpmalloc -DLLVM_USE_CRT_RELEASE=MT` where `D:/git/rpmalloc` has already been git clone'd from `https://github.com/mjansson/rpmalloc`. The same applies to snmalloc and mimalloc.

When enabled, the allocator will be embeded (statically linked) into the LLVM tools & libraries. This currently only works with the static CRT (/MT), although using the dynamic CRT (/MD) could potentially work as well in the future.

When enabled, this changes the memory stack from:
  new/delete -> MS VC++ CRT malloc/free -> HeapAlloc -> VirtualAlloc
to:
  new/delete -> {rpmalloc|snmalloc|mimalloc} -> VirtualAlloc

The goal of this patch is to bypass the application's global heap - which is thread-safe thus inducing locking - and instead take advantage of a modern lock-free, thread cache, allocator. On a 6-core Xeon Skylake we observe a 2.5x decrease in execution time when linking a large scale application with LLD and ThinLTO (12 min 20 sec -> 5 min 34 sec), when all hardware threads are being used (using LLD's flag /opt:lldltojobs=all). On a dual 36-core Xeon Skylake with all hardware threads used, we observe a 24x decrease in execution time (1 h 2 min -> 2 min 38 sec) when linking a large application with LLD and ThinLTO. Clang build times also see a decrease in the range 5-10% depending on the configuration.

Differential Revision: https://reviews.llvm.org/D71786
2020-08-27 11:09:46 -04:00
Florian Hahn
7dd87cb5e7 [docs] Clarify ENABLE_MODULES uses Clang Header Modules.
Suggested post-commit by @dblaikie, thanks!
2020-08-19 17:38:34 +01:00
Kazu Hirata
fc9284d5ff [docs] Fix typos 2020-08-09 19:31:49 -07:00
Florian Hahn
3ac0102ef0 [docs] Mention LLVM_ENABLE_MODULES. 2020-08-04 16:59:39 +01:00
Louis Dionne
1f1171c0d4 [CMake] Bump CMake minimum version to 3.13.4
This upgrade should be friction-less because we've already been ensuring
that CMake >= 3.13.4 is used.

This is part of the effort discussed on llvm-dev here:

  http://lists.llvm.org/pipermail/llvm-dev/2020-April/140578.html

Differential Revision: https://reviews.llvm.org/D78648
2020-07-22 14:25:07 -04:00
Jean-Michel Gorius
37d2223306 [llvm][docs] Document the LLVM_INSTALL_UTILS CMake option (NFC) 2020-06-18 15:31:13 +02:00
Zola Bridges
0bc062586e [dfsan] Add "DataFlow" option to LLVM_USE_SANITIZER
Summary:
This patch add the dataflow option to LLVM_USE_SANITIZER and documents
it.

Tested via check-cxx (wip to fix the errors).

Reviewers: morehouse, #libc!

Subscribers: mgorny, cfe-commits, libcxx-commits

Tags: #clang, #libc

Differential Revision: https://reviews.llvm.org/D78390
2020-04-20 10:30:52 -07:00
Sylvestre Ledru
8598ae94d7 Doc: Links should use https 2020-03-22 22:49:33 +01:00
Petr Hosek
a988522a04 [CMake] Enable the use of -ffile-prefix-map
This handles not paths embedded in debug info, but also in sources.
Since the use of this flag is controlled by an option, rather than
replacing the new option, we add a new option.

Differential Revision: https://reviews.llvm.org/D76018
2020-03-19 15:14:15 -07:00
Eric Christopher
ee4be934c0 Continue removing llgo. 2020-02-10 10:33:58 -08:00
Nico Weber
6be5d5bda8 Make LLVM_APPEND_VC_REV=OFF affect clang, lld, and lldb as well.
When LLVM_APPEND_VC_REV=OFF is set, the current git hash is no
longer embedded into binaries (mostly for --version output).
Without it, most binaries need to relink after every single
commit, even if they didn't change otherwise (due to, say,
a documentation-only commit).

LLVM_APPEND_VC_REV is ON by default, so this doesn't change the
default behavior of anything.

With this, all clients of GenerateVersionFromVCS.cmake honor
LLVM_APPEND_VC_REV.

Differential Revision: https://reviews.llvm.org/D72855
2020-01-16 19:04:08 -05:00
Tom Stellard
fbd15449ff [cmake] Remove LLVM_{BUILD,LINK}_LLVM_DYLIB options on Windows
Summary: The options aren't supported so they can be removed.

Reviewers: beanz, smeenai, compnerd

Reviewed By: compnerd

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69877
2019-11-08 10:37:16 -08:00
Saleem Abdulrasool
f93757f9ac build: remove LLVM_CXX_STD extension point
This extension point is not needed. Provide the equivalent option
through `CMAKE_CXX_STANDARD` which mirrors the previous extension point. Rely on
CMake to provide the check for the compiler instead.
2019-10-25 11:51:47 -07:00
Kit Barton
b4d367c63a Fix broken sphinx link in CMake.rst.
Reviewers: delcypher, beanz

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69325
2019-10-22 14:49:58 -07:00
Sylvestre Ledru
0e050e2a4c Explicit in the doc the current list of projects (with easy copy and paste)
llvm-svn: 375339
2019-10-19 09:55:24 +00:00
Sylvestre Ledru
0b69f98f0c Make it clear in the doc that 'all' in LLVM_ENABLE_PROJECTS does install ALL projects
llvm-svn: 375337
2019-10-19 09:27:14 +00:00
Sylvestre Ledru
b0c1aff472 doc update: explain that Z3 is only for clang SA - thanks to LebedevRI for the suggestion
llvm-svn: 371110
2019-09-05 19:50:56 +00:00
Sylvestre Ledru
e6837b1644 document the LLVM_ENABLE_Z3_SOLVER option
llvm-svn: 371109
2019-09-05 19:38:15 +00:00
Erich Keane
8d0fafd361 Add support in CMake to statically link the C++ standard library.
It is sometimes useful to have the C++ standard library linked into the
assembly when compiling clang, particularly when distributing a compiler
onto systems that don't have a copy of stdlibc++ or libc++ installed.

This functionality should work with either GCC or Clang as the host
compiler, though statically linking libc++ (as may be required for
licensing purposes) is only possible if the host compiler is Clang with
a copy of libc++ available.

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

llvm-svn: 368907
2019-08-14 19:55:59 +00:00
Erich Keane
2629d550df Fix spacing of LLVM_USE_PERF in CMake.rst that caused it to be tabbed in funny
llvm-svn: 367585
2019-08-01 17:30:25 +00:00
Erich Keane
ae6568a137 Document LLVM_ENABLE_LIBCXX in CMake.rst
llvm-svn: 367584
2019-08-01 17:30:21 +00:00
Anusha Basana
cb472f88b8 [build] Add the ability to create a symlink for lipo
Add user enabled option to create lipo with symlink to llvm-lipo
Used rL326381 for reference.

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

llvm-svn: 367444
2019-07-31 16:46:57 +00:00
Sylvestre Ledru
5622edf8ed remove a duplicate declaration
llvm-svn: 366205
2019-07-16 12:05:54 +00:00
Sylvestre Ledru
cdbbe489dd Document the LLVM_ENABLE_BINDINGS option
llvm-svn: 366204
2019-07-16 11:59:17 +00:00
Sven van Haastregt
6f97dc2303 Remove some autoconf references from docs and comments
The autoconf build system support has been removed a while ago, remove
some outdated references.

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

llvm-svn: 365013
2019-07-03 09:57:59 +00:00
J. Ryan Stinnett
a1a7756d8d [Docs] Modernize references to macOS
Summary:
This updates all places in documentation that refer to "Mac OS X", "OS X", etc.
to instead use the modern name "macOS" when no specific version number is
mentioned.

If a specific version is mentioned, this attempts to use the OS name at the time
of that version:

* Mac OS X for 10.0 - 10.7
* OS X for 10.8 - 10.11
* macOS for 10.12 - present

Reviewers: JDevlieghere

Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits

Tags: #clang, #lldb, #libc, #llvm

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

llvm-svn: 362113
2019-05-30 16:46:22 +00:00
Saleem Abdulrasool
3c0a69a728 build: add option to disable unwind tables
The unwind tables (`.eh_frame`, `.arm.extab`) add a significant chunk of data to
the final binaries.  These should not be needed normally, particularly when
exceptions are disabled.  This enables shrinking `lldb-server` by ~18% (3 MiB)
when built with gold.

llvm-svn: 359819
2019-05-02 19:37:26 +00:00
Justin Bogner
dda7e6e86e [CMake] Replace LLVM_ENABLE_CXX1Y and friends with LLVM_CXX_STD
Simplify building with particular C++ standards by replacing the
specific "enable standard X" flags with a flag that allows specifying
the standard you want directly.

We preserve compatibility with the existing flags so that anyone with
those flags in existing caches won't break mysteriously.

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

llvm-svn: 357899
2019-04-08 10:19:17 +00:00
Shoaib Meenai
a6a61902e0 [docs] Document LLVM_ENABLE_IDE
Use some of the wording and the motivating example from r344555. The
lack of documentation was pointed out by Roman Lebedev.

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

llvm-svn: 354167
2019-02-15 20:40:26 +00:00
Rong Xu
10486b5c91 [Cmake] Add an option to build LLVM using the experimental new pass manager
Add LLVM_USE_NEWPM to build LLVM using the experimental new pass manager.

Differential Revision: http://reviews.llvm.org/D57068

llvm-svn: 353550
2019-02-08 19:31:03 +00:00
JF Bastien
406b84702a Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

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

llvm-svn: 353374
2019-02-07 05:20:00 +00:00
JF Bastien
495652a992 Revert "Bump minimum toolchain version"
Reverting D57264 again, it looks like we're down to two bots that need fixing:

polly-amd64-linux
polly-arm-linux

They both have old versions of libstdc++ and recent clang.

llvm-svn: 352954
2019-02-02 06:01:12 +00:00
JF Bastien
5b2eb5b50c Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

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

llvm-svn: 352951
2019-02-02 05:15:34 +00:00
JF Bastien
d34b028451 Revert "Bump minimum toolchain version"
Looks like we still have a few bots that are sad. Let try to get them fixed!

llvm-svn: 352835
2019-02-01 04:44:39 +00:00
JF Bastien
0621177282 Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

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

llvm-svn: 352834
2019-02-01 04:33:21 +00:00
JF Bastien
d979e38527 Revert "Bump minimum toolchain version"
A handful of bots are still breaking, either because I missed them in my audit,
they were offline, or something else. I'm contacting their authors, but I'll
revert for now and re-commit later.

llvm-svn: 352814
2019-01-31 23:29:39 +00:00
JF Bastien
023da30e96 Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

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

llvm-svn: 352811
2019-01-31 23:13:10 +00:00
JF Bastien
36109c9464 [NFC] Factor out + document build requirements
Summary: This change factors out compiler checking / warning, and documents LLVM_FORCE_USE_OLD_TOOLCHAIN. It doesn't introduce any functional changes nor policy changes, these will come late.

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits

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

llvm-svn: 351387
2019-01-16 22:22:38 +00:00
Mark Searles
50666d8817 Fix typo: "with he MODULE" -> "with the MODULE"
Differential Revision: https://reviews.llvm.org/D56302

llvm-svn: 350400
2019-01-04 16:35:01 +00:00
Tom Stellard
c1b672534d cmake: Remove add_llvm_loadable_module()
Summary:
This function is very similar to add_llvm_library(),  so this patch merges it
into add_llvm_library() and replaces all calls to add_llvm_loadable_module(lib ...)
with add_llvm_library(lib MODULE ...)

Reviewers: philip.pfaffe, beanz, chandlerc

Reviewed By: philip.pfaffe

Subscribers: chapuni, mgorny, llvm-commits

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

llvm-svn: 349839
2018-12-20 22:04:08 +00:00
Reid Kleckner
8c11658b5d [benchmark] Re-enable benchmarks on all platforms including Windows
The assertion in MCCodeView.cpp was resolved in r340878.

This reverts both r340905 and r340836, making benchmarks build by
default everywhere.

llvm-svn: 341716
2018-09-07 21:47:00 +00:00
Matthias Braun
fd5877ed05 Revamp test-suite documentation
- Remove duplication: Both TestingGuide and TestSuiteMakefileGuide
  would give a similar overview over the test-suite.
- Present cmake/lit as the default/normal way of running the test-suite:
- Move information about the cmake/lit testsuite into the new
  TestSuiteGuide.rst file. Mark the remaining information in
  TestSuiteMakefilesGuide.rst as deprecated.
- General simplification and shorting of language.
- Remove paragraphs about tests known to fail as everything should pass
  nowadays.
- Remove paragraph about zlib requirement; it's not required anymore
  since we copied a zlib source snapshot into the test-suite.
- Remove paragraph about comparison with "native compiler". Correctness is
  always checked against reference outputs nowadays.
- Change cmake/lit quickstart section to recommend `pip` for installing
  lit and use `CMAKE_C_COMPILER` and a cache file in the example as that
  is what most people will end up doing anyway. Also a section about
  compare.py to quickstart.
- Document `Bitcode` and `MicroBenchmarks` directories.
- Add section with commonly used cmake configuration options.
- Add section about showing and comparing result files via compare.py.
- Add section about using external benchmark suites.
- Add section about using custom benchmark suites.
- Add section about profile guided optimization.
- Add section about cross-compilation and running on external devices.

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

llvm-svn: 341260
2018-08-31 21:47:01 +00:00
Kirill Bobyrev
66a3a0778c [benchmark] NFC: Turn benchmark ON on all non-Windows buildbots
The problems with benchmark build should be fixed now, but Windows
buildbots still run into errors seemingly because of the bug in
clang-cl. Because of that, benchmark shouldn't be built on Windows at
this point.

llvm-svn: 340905
2018-08-29 08:59:36 +00:00