Commit Graph

105 Commits

Author SHA1 Message Date
NAKAMURA Takumi 55bf953344 [CMake] Reformat CLANG_TEST_DEPS.
llvm-svn: 250503
2015-10-16 09:38:42 +00:00
Teresa Johnson 8f865a41fb Add llvm-bcanalyzer to list of clang test dependences
This addresses a bot failure from r250455, since new Misc/thinlto.c
test uses it.

llvm-svn: 250460
2015-10-15 21:06:53 +00:00
NAKAMURA Takumi 10808274b8 [CMake] r247548 introduced llvm-readobj.
llvm-svn: 247554
2015-09-14 12:42:52 +00:00
NAKAMURA Takumi 0f1cbee00e [CMake] Reformat CLANG_TEST_DEPS.
llvm-svn: 247553
2015-09-14 12:41:53 +00:00
Adrian Prantl bc068586ac Revert "Revert r241620 and follow-up commits" and move the initialization
of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp.

llvm-svn: 241653
2015-07-08 01:00:30 +00:00
Adrian Prantl 142ec39739 Revert r241620 and follow-up commits while investigating linux buildbot failures.
llvm-svn: 241642
2015-07-07 23:19:46 +00:00
Adrian Prantl e50371b948 Wrap clang modules and pch files in an object file container.
This patch adds ObjectFilePCHContainerOperations uses the LLVM backend
to put the contents of a PCH into a __clangast section inside a COFF, ELF,
or Mach-O object file container.

This is done to facilitate module debugging by makeing it possible to
store the debug info for the types defined by a module alongside the AST.

rdar://problem/20091852

llvm-svn: 241620
2015-07-07 20:11:29 +00:00
Adrian Prantl cbc368c5b5 Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."
llvm-svn: 230454
2015-02-25 02:44:04 +00:00
Adrian Prantl 8bf7af3de8 Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.

This reapplies r230044 with a fixed configure+make build and updated
dependencies and testcase requirements. Over the last iteration this
version adds
- missing target requirements for testcases that specify an x86 triple,
- a missing clangCodeGen.a dependency to libClang.a in the make build.

rdar://problem/19104245

llvm-svn: 230423
2015-02-25 01:31:45 +00:00
Adrian Prantl a39924a1f8 Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."
This reverts commit r230305.
Off to fix another round of missing dependencies on various platforms.

llvm-svn: 230309
2015-02-24 05:14:17 +00:00
Adrian Prantl fc360dc30b Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.

rdar://problem/19104245

This reapplies r230044 with a fixed configure+make build and updated
dependencies. Take 3.

llvm-svn: 230305
2015-02-24 04:25:59 +00:00
Adrian Prantl 67fbfa3773 Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."
This reverts commit 230099.

The Linux configure+make build variant still needs some work.

llvm-svn: 230103
2015-02-21 00:29:14 +00:00
Adrian Prantl f2b0cd91eb Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.

rdar://problem/19104245

This reapplies r230044 with a fixed configure+make build and updated
dependencies. Take 2.

llvm-svn: 230089
2015-02-20 23:34:26 +00:00
Adrian Prantl 690b2f7746 Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."
This reverts commit r230067.

Investigating another batch of problems found by the bots.

llvm-svn: 230073
2015-02-20 22:12:19 +00:00
Adrian Prantl b59bc1a528 Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.

rdar://problem/19104245

This reapplies r230044 with a fixed configure+make build and updated
dependencies.

llvm-svn: 230067
2015-02-20 21:53:12 +00:00
Alp Toker 0621cb2e7d Make clang's rewrite engine a core feature
The rewrite facility's footprint is small so it's not worth going to these
lengths to support disabling at configure time, particularly since key compiler
features now depend on it.

Meanwhile the Objective-C rewriters have been moved under the
ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still
potentially worth excluding from lightweight builds.

Tests are now passing with any combination of feature flags. The flags
historically haven't been tested by LLVM's build servers so caveat emptor.

llvm-svn: 213171
2014-07-16 16:48:33 +00:00
Alp Toker ccb9aa3586 Fix build with various feature flag combinations
llvm-svn: 212996
2014-07-14 22:17:22 +00:00
Alp Toker f55a306996 Fix the !CLANG_ENABLE_ARCMT build
llvm-svn: 212995
2014-07-14 22:17:16 +00:00
Alp Toker 1a58ff2424 Don't add examples to the check-clang dependencies unless requested
The tests were correctly getting skipped but the targets still mistakenly got
built.

llvm-svn: 209983
2014-06-01 02:02:23 +00:00
Alp Toker ee77934c17 Update lit.cfg to support the clang-interpreter test from r207950
Performs behind-the-scenes RUN line substitution similarly to what's done with
clang-check and clang-format to ensure the executable is found.

llvm-svn: 207951
2014-05-05 06:42:07 +00:00
Justin Bogner 534f14abe7 test: Use llvm-profdata merge in Profile tests
In preparation for using a binary format for instrumentation based
profiling, explicitly treat the test inputs as text and transform them
before running. This will allow us to leave the checked in files in
human readable format once the instrumentation format is binary.

No functional change.

llvm-svn: 206509
2014-04-17 22:49:06 +00:00
NAKAMURA Takumi c28a9a2c33 [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.
LLVM_*_OUTPUT_INTDIR should be available everywhere. It was my mistake when I introduced INTDIR stuff.

llvm-svn: 199597
2014-01-19 13:00:01 +00:00
NAKAMURA Takumi 718d3b63f6 [CMake] Prune LLVM_TOOLS_DIR and LLVM_LIBS_DIR in clang/test/CMakeLists.txt. They are overridden in configure_lit_site_cfg().
llvm-svn: 199591
2014-01-19 12:45:35 +00:00
NAKAMURA Takumi 2e3166af59 [CMake] check-clang requires clang-tblgen. It is not required by anyone when external CLANG_TABLEGEN is specified.
llvm-svn: 199579
2014-01-19 08:54:48 +00:00
NAKAMURA Takumi af4480a121 check-clang: Add dependencies to PrintFunctionNames and SampleAnalyzerPlugin, for r198747 and r198820.
llvm-svn: 198867
2014-01-09 13:26:02 +00:00
NAKAMURA Takumi ef4657e6f1 check-clang: Suppress LLVM_LIT in add_lit_testsuite, for now.
llvm-svn: 197702
2013-12-19 17:10:30 +00:00
NAKAMURA Takumi e6d79ec0eb [CMake][Standalone] Rewrite standalone build based on llvm-config. CLANG_PATH_TO_LLVM_*(s) are deprecated.
Checked on VS10(multiconfig) and some singleconfig builders.

* Assumptions

  - You should specify llvm-config as LLVM_CONFIG.
    CMake could find one in $PATH by default.

  - ENABLE_ASSERTIONS obeys LLVM's.

* Use cases

  a) With LLVM build tree

    Assume llvm-config is in your build tree.
    Everything should work as ever.

  b) With *installed* LLVM

    Assume distributions. The source tree can be optional.

    b1) The source tree is provided on the location `llvm-config --src-root`

      - Test utils, FileCheck &c., are imported and built in the new tree.
      - Gtest is built in the tree if gtest library is not found.
      - Lit is used in $(SRCROOT)/utils/lit/lit.py.

    b2) The source tree is not provided

      - clang and utilities can be built.
      - All tests, unittests and check-clang are invalidated and not built.

llvm-svn: 197697
2013-12-19 16:44:32 +00:00
NAKAMURA Takumi ed79c96f89 [CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of gtest.h then.
llvm-svn: 197688
2013-12-19 16:05:44 +00:00
NAKAMURA Takumi 5de6b43898 [CMake] check-clang: Append items to CLANG_TEST_DEPS rather than set. CLANG_TEST_DEPS can be set in parent scope.
llvm-svn: 197687
2013-12-19 16:05:39 +00:00
NAKAMURA Takumi 5db0c689b2 [CMake] check-clang: Deprecate --path, according to r197576.
llvm-svn: 197686
2013-12-19 16:05:34 +00:00
NAKAMURA Takumi 462ba80fda check-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated from llvm.
llvm-svn: 197576
2013-12-18 15:08:56 +00:00
NAKAMURA Takumi 96357e6af7 clang/test/CMakeLists.txt: Prune CLANG_SOURCE_DIR and CLANG_BINARY_DIR. They are set at top.
llvm-svn: 197575
2013-12-18 15:08:49 +00:00
NAKAMURA Takumi 17645a4772 [CMake][Standalone] Fixup r197395 for standalone build.
Standalone scripts shall be rewritten.

llvm-svn: 197459
2013-12-17 04:14:17 +00:00
NAKAMURA Takumi 67eade63fd check-clang: Introduce get_llvm_config_props in clang/test/lit.cfg.
In trunk, we can use features as below:

  aarch64-registered-target
  hexagon-registered-target
  msp430-registered-target
  r600-registered-target
  systemz-registered-target
  xcore-registered-target

Each of them, as below, implies corresponding subtargets:

  arm-registered-target   -- arm, thumb
  mips-registered-target  -- mips, mips64, mips64el, mipsel
  nvptx-registered-target -- nvptx, nvptx64
  sparc-registered-target -- sparc, sparcv9
  x86-registered-target   -- x86, x86-64

They will be renamed:

  cppbackend-registered-target -- was "cpp". Unused in trunk.
  powerpc-registered-target -- was "ppc32", "ppc64" and "ppc64le".

The feature "asserts" is also taken from llvm-config.

llvm-svn: 196347
2013-12-04 03:40:56 +00:00
Daniel Jasper b7fb5e6f4b Re-add clang-format tests to clang/test.
Also now use -strict-whitespace as the tests are confusing otherwise.

llvm-svn: 177853
2013-03-25 09:14:25 +00:00
Evgeniy Stepanov eeabe82762 Add llvm-symbolizer as test dependency.
It is required when building tests with ASan or MSan.

llvm-svn: 176942
2013-03-13 09:36:02 +00:00
Jordan Rose 08bf4fd345 CMake: Include Clang unit tests in check-clang target in standalone builds.
Also, remove CLANG_BUILD_TESTS option. It won't have consistent behavior
between standalone and non-standalone builds, so I'm not going to bother
hooking it up for standalone builds. LLVM_BUILD_TESTS will continue to
control unit test inclusion in the "all" target in non-standalone builds.

Finally, fix the default value of CLANG_INCLUDE_TESTS, which was being set
to the boolean value of "LLVM_INCLUDE_TESTS", i.e. OFF, rather than actually
reading the variable ${LLVM_INCLUDE_TESTS}! If you picked up my earlier
commit, YOU WILL HAVE TO MANUALLY SET THIS OPTION BACK ON. My apologies!

Part two of r174691 (allow the unit tests to be built in standalone mode).

llvm-svn: 174698
2013-02-08 07:28:25 +00:00
NAKAMURA Takumi 61a8f974a7 [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.
For example,
cur) unittests/ADT/Release/ADTTests
new) unittests/ADT/ADTTests

RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR.

With Make and Ninja, the tree is not built with multiple configurations.
Then, including the build type in target directory doesn't make sense.
See also "How can I build multiple modes without switching?"
http://www.cmake.org/Wiki/CMake_FAQ
CMAKE_CFG_INTDIR is set to "."

With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example,
unittests/ADT/Release/ADTTests.exe
CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)".

Thus, "--param build_config" is also deprecated.

llvm-svn: 173616
2013-01-27 12:20:50 +00:00
NAKAMURA Takumi df0b43d1f9 clang/test: [CMake] check-clang doesn't require llvm-dis any more.
llvm-svn: 173116
2013-01-22 01:52:04 +00:00
Alexander Kornienko cdc3987ca8 Removed standalone clang-ast-dump tool.
llvm-svn: 160772
2012-07-26 01:44:18 +00:00
Alexander Kornienko f2f82550fd The new clang-ast-dump tool for selective AST dumping. Moved common command-line tool stuff to CommandLineClangTool
llvm-svn: 160265
2012-07-16 12:46:48 +00:00
Chandler Carruth dc2e4bcad3 Extend a workaround for a CMake bug in LLVM's r159593 to apply to
a Clang target which hits the same bug directly.

llvm-svn: 159598
2012-07-02 21:46:03 +00:00
Chandler Carruth 3bf1d5d1de We support a mode where the Clang regression tests are run but not the
Clang unit tests. It's not clear why we support this mode in builds
where LLVM is available (LLVM itself does not), but at least this makes
us support it correctly.

This also fixes a long-standing bug where we would pass the unit test
param flag to lit in the standalone build even though the standalone
build *never* has the unittests built and ready for testing.

llvm-svn: 159594
2012-07-02 21:37:04 +00:00
Chandler Carruth 6b963db39a Switch from using a lit.cfg-generator variable to the real variable in
the standalone mode. We've changed scoping and sequencing of variables
being defined and that cause this to start to be unset breaking some
cmake users. Thanks to Jordan Rose for the report.

The fix also makes the condition on the preceding line much more
sensible. =D

llvm-svn: 159576
2012-07-02 20:14:59 +00:00
Chandler Carruth 8a6290721e Switch Clang to use the new common LLVM CMake infrastructure for adding
lit testsuites. This sinks all management of the aggregate lit runs into
the LLVM CMake files, making Clang only responsible for declaring its
own testsuite. In the process we fix numerous "bugs" where the proper
method of invoking lit has changed over time, and the old system
encoded several broken artifacts of this in ABIs and compatibility
tests.

It also switches to 'check-clang' for the canonical name of the test
suite, although 'clang-test' remains as an alias.

The situation when Clang is being built in standalone mode is little
changed. It replicates just enough of the lit setup to cope with the
oddities of being run outside of an LLVM build.

llvm-svn: 159483
2012-06-30 10:14:27 +00:00
Chandler Carruth 8279aa7825 Switch Clang's CMake lit.site.cfg generation over to use the common
helpers rather than its own special-rolled code.

llvm-svn: 159398
2012-06-29 00:39:23 +00:00
Chandler Carruth 9d76f27786 Remove a completely unused and remarkably inaccurate list of test
directories from the cmake file. Dunno what the history is here, but
we're not using it.

More refactorings to come here.

llvm-svn: 159261
2012-06-27 10:06:26 +00:00
Chandler Carruth c0674c1fda Update the Clang CMake build to reflect the name change in LLVM r159258.
llvm-svn: 159260
2012-06-27 09:49:07 +00:00
Manuel Klimek 750caacbb2 Add the dependency on clang-check to clang-test, so clang-check
can be integration tested.

llvm-svn: 154009
2012-04-04 12:18:22 +00:00
NAKAMURA Takumi 185de44959 CMake: Promote the testing targets out of folders on IDE.
llvm-svn: 149220
2012-01-30 03:15:47 +00:00