649 Commits

Author SHA1 Message Date
Siva Chandra
820be7b079 Add few docs and implementation of strcpy and strcat.
Summary:
This patch illustrates some of the features like modularity we want
in the new libc. Few other ideas like different kinds of testing, redirectors
etc are not yet present.

Reviewers: dlj, hfinkel, theraven, jfb, alexshap, jdoerfert

Subscribers: mgorny, dexonsmith, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373764 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-04 17:30:54 +00:00
Djordje Todorovic
427122534b Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

The cause of the test failure was resolved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373427 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-02 07:00:01 +00:00
Djordje Todorovic
99e194354c Revert "Reland "[utils] Implement the llvm-locstats tool""
This reverts commit rL373317 due to test failure on the
clang-s390x-linux build bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373336 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-01 13:21:15 +00:00
Djordje Todorovic
75c7881143 Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373317 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-01 09:59:15 +00:00
Djordje Todorovic
c6dd656bf3 Revert "Reland "[utils] Implement the llvm-locstats tool""
This reverts commit rL373183.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373200 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-30 11:19:11 +00:00
Djordje Todorovic
a547aa57c4 Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373183 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-30 07:35:17 +00:00
Djordje Todorovic
6d72c4356e Revert "Reland "[utils] Implement the llvm-locstats tool""
This reverts commit rL372554.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372580 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 11:04:11 +00:00
Djordje Todorovic
e74b9252d2 Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372554 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-23 07:57:53 +00:00
Russell Gallop
527096752d [cmake] Changes to get Windows self-host working with PGO
Fixes quoting of profile arguments to work on Windows
Suppresses adding profile arguments to linker flags when using lld-link
Avoids -fprofile-instr-use being added to rc.exe flags
Removes duplicated adding of -fprofile-instr-use to linker flags (since
r355541)
Move handling LLVM_PROFDATA_FILE to HandleLLVMOptions.cmake

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372209 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-18 09:43:13 +00:00
Djordje Todorovic
dcad4a5a55 Revert "[utils] Implement the llvm-locstats tool"
This reverts commit rL371520.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371527 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 14:48:52 +00:00
Djordje Todorovic
4964f4e3b1 [utils] Implement the llvm-locstats tool
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

The tool will be very useful for tracking improvements regarding the
"debugging optimized code" support with LLVM ecosystem.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371520 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-10 13:47:03 +00:00
Reid Kleckner
35a1ff0702 Revert Autogenerate the shebang lines for tools/opt-viewer
This reverts r369486 (git commit 8d18384809957cc923752e10a86adab129e3df48)

The opt-viewer tests don't pass after this change, and fixing them isn't
trivial. opt-viewer.py imports optmap, which requires adjusting
pythonpath, which is more work than I'm willing to do to fix forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370095 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-27 18:31:29 +00:00
Chris Bieneman
dd9264d345 Autogenerate the shebang lines for tools/opt-viewer
Summary:
Since these files depend on the built python modules, they need to use
the right python binary to run them. So use configure_file
to set the right shebang line.

Patch By: cbiesinger (Christian Biesinger)

Reviewers: chandlerc, beanz, anemet

Reviewed By: anemet

Subscribers: compnerd, JDevlieghere, mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369486 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 01:48:28 +00:00
Erich Keane
89ae907520 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368907 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 19:55:59 +00:00
Taewook Oh
7208407815 Revert the test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368485 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-09 20:52:39 +00:00
Taewook Oh
dd37bbc5b8 Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368483 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-09 20:48:53 +00:00
Anusha Basana
d174e9120d [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367444 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-31 16:46:57 +00:00
Reid Kleckner
2f158d66cf Remove cmake checks for MSVC 1900 / VS 2013
Our minimum Visual C++ version is 19.10 from Visual Studio 2017.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367362 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 22:49:11 +00:00
Rainer Orth
ac2843934b [CMake] Define _FILE_OFFSET_BITS=64 on Solaris
This is the compantion patch to https://reviews.llvm.org/D64482, needed to ensure
that builds with host compilers that don't yet predefine _FILE_OFFSET_BITS=64 on
Solaris succeed by always making the host and freshly built clang consistent.

Tested on x86_64-pc-solaris2.11.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367304 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 10:33:20 +00:00
Yuanfang Chen
91bd0c8186 [CMake] Allow LLVM_EXTERNAL_<proj>_SOURCE_DIR to be overridden if it is
empty.

This makes adding projects to LLVM_ENABLE_PROJECTS possible.
Also its type should be PATH.

https://bugs.llvm.org/show_bug.cgi?id=42698

Reviewers: beanz, greened, chapuni

Reviewed by: beanz

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367144 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-26 19:25:57 +00:00
Nathan Lanza
0687ba8500 [cmake] Convert the NATIVE llvm build process to be project agnostic
lldb recently added a tablegen tool. In order to properly cross compile
lldb standalone there needs to be a mechanism to generate the native
lldb build, analgous to what's done for the NATIVE llvm build. Thus,
we can simply modify this setup to allow for any project to be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366514 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 00:10:06 +00:00
Jonas Devlieghere
cf2dfe42ee [CMake] Don't set Python_ADDITIONAL_VERSIONS
Until recently, Python_ADDITIONAL_VERSIONS was used to limit LLVM's
Python support to 2.7. Now that both LLVM and LLDB both support Python
3, there's no longer a need to put an arbitrary limit on this.

However, instead of removing the variable, r365692 expanded the list,
which has the (presumably unintentional) side-effect of expression
preference for Python 3.

Instead, as Michal proposed in the original code review, we should just
not set the list at all, and let CMake pick whatever Python interpreter
you have in your path.

This patch removes the Python_ADDITIONAL_VERSIONS variable in llvm,
clang and lld. I've also updated the docs with the default behavior and
how to force a different Python version to be used.

Differential revision: https://reviews.llvm.org/D64894

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366447 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-18 15:17:42 +00:00
Hans Wennborg
7e5ae86c18 Bump the trunk version to 10.0.0svn
and clear the release notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366427 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-18 11:51:05 +00:00
Alex Bradbury
133be34ede [RISCV] Re-land r366331 d RISCV to LLVM_ALL_TARGETS
*San flagged issues should be now be addressed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366399 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-18 04:05:18 +00:00
Alex Bradbury
9b6d8eaa98 [RISCV] Revert r366331 as it exposed some sanitizer failures
See <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/33612>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366343 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-17 16:14:52 +00:00
Alex Bradbury
75bdfa8ae3 [RISCV] Add RISCV to LLVM_ALL_TARGETS so it s built by default
This follows the RFC <http://lists.llvm.org/pipermail/llvm-dev/2019-July/133724.html>.

Follow-on commits will add appropriate release notes changes etc.

Pushing this now and in a minimal form so there is reasonable time before 9.0
branches to resolve any issues arising from e.g. the backend being exposed on
different sanitizer setups.

The current builder for RISC-V is on the staging build-bot
<http://lab.llvm.org:8014/builders/llvm-riscv-linux>, however with the RISCV
backend being built by default it won't provide any real additional coverage.
We will shortly set up a builder that runs the test-suite in qemu-user.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366331 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-17 14:32:25 +00:00
Nico Weber
213d1037e9 Add support for building with Python 3
LLDB supports Python 3 now.

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

Patch from Christian Biesinger <cbiesinger@google.com>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365692 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-10 19:31:25 +00:00
Chris Bieneman
b513268c38 Fix issues building libraries as more than one type with Xcode
Summary:
CMake+Xcode doesn't seem to handle targets that only have object
sources. This patch works around that limitation by adding a dummy
soruce file to any library target that is generated by llvm_add_library
when object libraries are generated.

Object libraries are generated whenever llvm_add_library is passed more
than one library type, which is now the default case for clang static
libraries (which generate STATIC and OBJECT libraries).

Reviewers: zturner, compnerd, joanlluch

Reviewed By: joanlluch

Subscribers: joanlluch, xbolva00, mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365365 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-08 18:29:29 +00:00
Saleem Abdulrasool
f27f188798 build: extract LLVM distribution target handling
This extracts the LLVM distribution target handling into a support module.
Extraction will enable us to restructure the builds to support multiple
distribution configurations (e.g. developer and user) to permit us to build the
development package and the user package at once.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363440 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-14 18:28:57 +00:00
David Tenty
6192928911 Build with _XOPEN_SOURCE defined on AIX
Summary:
It is useful to build with _XOPEN_SOURCE defined on AIX, enabling X/Open
and POSIX compatibility mode, to work around stray macros and other
bugs in the headers provided by the system and build compiler.

This patch adds the config to cmake to build with _XOPEN_SOURCE defined
on AIX with a few exceptions. Google Test internals require access to
platform specific thread info constructs on AIX so in that case we build
with _ALL_SOURCE defined instead. Libclang also uses header which needs
_ALL_SOURCE on AIX so we leave that as is as well.

We also add building on AIX with the large file API and doing CMake
header checks with X/OPEN definitions so the results are consistent with
the environment that will be present in the build.

Reviewers: hubert.reinterpretcast, xingxue, andusy

Reviewed By: hubert.reinterpretcast

Subscribers: mgorny, jsji, cfe-commits, llvm-commits

Tags: #llvm, #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362808 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 15:45:25 +00:00
David Zarzycki
c3fb55dfba Unbreak my hasty "unbreak" cmake fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362492 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-04 11:33:49 +00:00
David Zarzycki
de62abc8eb Unbreak non-PIC builds after r362390 / D62720
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362399 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-03 13:39:49 +00:00
Don Hinton
6964f65388 [test] Fix plugin tests
Recommit of r361790 that was temporarily reverted in r361793 due to bot breakage.

Summary:
The following changes were required to fix these tests:

1) Change LLVM_ENABLE_PLUGINS to an option and move it to
   llvm/CMakeLists.txt with an appropriate default -- which matches
   the original default behavior.

2) Move the plugins directory from clang/test/Analysis
   clang/lib/Analysis.  It's not enough to add an exclude to the
   lit.local.cfg file because add_lit_testsuites recurses the tree and
   automatically adds the appropriate `check-` targets, which don't
   make sense for the plugins because they aren't tests and don't
   have `RUN` statements.

   Here's a list of the `clang-check-anlysis*` targets with this
   change:

```
  $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis
  check-clang-analysis
  check-clang-analysis-checkers
  check-clang-analysis-copypaste
  check-clang-analysis-diagnostics
  check-clang-analysis-engine
  check-clang-analysis-exploration_order
  check-clang-analysis-html_diagnostics
  check-clang-analysis-html_diagnostics-relevant_lines
  check-clang-analysis-inlining
  check-clang-analysis-objc
  check-clang-analysis-unified-sources
  check-clang-analysis-z3
```

3) Simplify the logic and only include the subdirectories under
   clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set.

Reviewed By: NoQ

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362328 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-02 15:53:43 +00:00
Petr Hosek
ce40381734 [CMake] Use libtool for runtimes when building for Apple platform
LLVM CMake build already uses libtool instead of ar when building
for Apple platform and we should be using the same when building
runtimes. To do so, this change extracts the logic for finding
libtool into a separate file and then uses it from both the LLVM
build as well as the LLVM runtimes build.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362313 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-02 02:05:01 +00:00
Alexandre Ganea
47415a68f2 Revert r361826, as it still breaks LLDB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361837 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-28 15:04:39 +00:00
Alexandre Ganea
ef1b6ff6b6 [CMake] Default options for faster executables on MSVC
Differential Revision: https://reviews.llvm.org/D55056

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361826 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-28 14:14:48 +00:00
Don Hinton
a3723dfcba Revert [test] Fix plugin tests
This reverts r361790 (git commit fe5eaab2b5b4523886bd63aebcfea8cfce586fa1)

It's causing buildbot breakage, so reverting while I investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361793 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-28 06:38:16 +00:00
Don Hinton
d4583c9395 [test] Fix plugin tests
Summary:
The following changes were required to fix these tests:

1) Change LLVM_ENABLE_PLUGINS to an option and move it to
   llvm/CMakeLists.txt with an appropriate default -- which matches
   the original default behavior.

2) Move the plugins directory from clang/test/Analysis
   clang/lib/Analysis.  It's not enough to add an exclude to the
   lit.local.cfg file because add_lit_testsuites recurses the tree and
   automatically adds the appropriate `check-` targets, which don't
   make sense for the plugins because they aren't tests and don't
   have `RUN` statements.

   Here's a list of the `clang-check-anlysis*` targets with this
   change:

```
  $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis
  check-clang-analysis
  check-clang-analysis-checkers
  check-clang-analysis-copypaste
  check-clang-analysis-diagnostics
  check-clang-analysis-engine
  check-clang-analysis-exploration_order
  check-clang-analysis-html_diagnostics
  check-clang-analysis-html_diagnostics-relevant_lines
  check-clang-analysis-inlining
  check-clang-analysis-objc
  check-clang-analysis-unified-sources
  check-clang-analysis-z3
```

3) Simplify the logic and only include the subdirectories under
   clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set.

Reviewed By: NoQ

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361790 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-28 06:26:58 +00:00
Hans Wennborg
096b2564f3 Cmake: allow using LLVM_EXTERNAL_PROJECTS with LLVM_ENABLE_PROJECTS
The current code iterates over the combination of LLVM_EXTERNAL_PROJECTS
and LLVM_ENABLE_PROJECTS, but then disables projects that are only in
the former. If a project is in LLVM_EXTERNAL_PROJECTS, it should be
enabled.

See also llvm-commits thread on r354060.

Differential revision: https://reviews.llvm.org/D62289

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361751 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-27 09:03:00 +00:00
Saleem Abdulrasool
15218adbdd build: enable CMake policy 0077
Enable CMake policy 77. This alters the behavior of option. The old behavior
would remove the value of the option from the cache and create a new one. The
new behavior does not create the variable if it is defined already. This ensures
that subsequent reconfigures will behave identically. This seems better than the
setting of OLD - the desire is to ensure that it is set to OLD or NEW.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361307 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-21 20:28:32 +00:00
Saleem Abdulrasool
86b49e2b74 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359819 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-02 19:37:26 +00:00
Justin Bogner
b935402f9a [CMake] Move configuration of LLVM_CXX_STD to HandleLLVMOptions.cmake
Standalone builds of projects other than llvm itself (lldb, libcxx,
etc) include HandleLLVMOptions but not the top level llvm CMakeLists,
so we need to set this variable here to ensure that it always has a
value.

This should fix the build issues some folks have been seeing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357976 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-09 08:14:32 +00:00
Justin Bogner
9736ffc02a [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357899 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-08 10:19:17 +00:00
Mikhail R. Gadelha
987a6ac4c9 Moved everything SMT-related to LLVM and updated the cmake scripts.
Differential Revision: https://reviews.llvm.org/D54978

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356929 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-25 17:47:45 +00:00
Serge Guelton
1f6df780ec Use response file when generating LLVM-C.dll
As discovered in D56774 the command line gets to long, so use a response file
to give the script the libs. This change has been tested and is confirmed
working for me.

Commited on behalf of Jakob Bornecrantz.
Differential Revision: https://reviews.llvm.org/D56781



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356443 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-19 09:14:09 +00:00
Shoaib Meenai
3e4cd7e594 [cmake] Remove llvm from LLVM_ALL_PROJECTS
LLVM is always built; including it in LLVM_ENABLE_PROJECTS has no
effect, but since it's in LLVM_ALL_PROJECTS, we produce a confusing
message about it being disabled. Drop it from LLVM_ALL_PROJECTS to avoid
this. Pointed out by David Greene on the mailing list [1].

[1] http://lists.llvm.org/pipermail/llvm-dev/2019-March/130854.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355735 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-08 21:10:22 +00:00
Rong Xu
0646a823c0 [PGO] Context sensitive PGO (part 4)
Part 4 of CSPGO changes:
(1) add support in cmake for cspgo build.
(2) fix an issue in big endian.
(3) test cases.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355541 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-06 19:31:37 +00:00
David Greene
3ebbebd666 [CMake] Honor LLVM_EXTERNAL_<proj>_SOURCE_DIR
When LLVM_ENABLE_PROJECTS is set, CMake assumes the project
directories are all side-by-side. This is not always the case and
there's no reason to expect it if LLVM_EXTERNAL_<proj>_SOURCE_DIR is
set. Honor that setting if it exists and allow the build configuration
to continue.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354693 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-22 21:19:48 +00:00
Chris Bieneman
a7225a2f1e [CMake] Fix ability to use LLVM_ENABLE_PROJECTS with LLVM_EXTERNAL_PROJECTS
LLVM r353148, changed the circumstances in which the project source directory variables are created to only create them for LLVM projects. This patch initializes the directory variables for projects specified in `LLVM_EXTERNAL_PROJECTS` as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354060 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-14 20:57:17 +00:00
Nico Weber
3e53c14be5 Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS
If you want to build clang-tools-extra with monorepo, just add it to
LLVM_ENABLE_PROJECTS like with other projects.

See also "Separating clang-tools-extra from clang in LLVM_ENABLE_PROJECTS"
on cfe-dev.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354057 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-14 20:26:35 +00:00