summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* [gn build] Start adding build files for LLVM unittestsNico Weber2019-01-0413-3/+317
| | | | | | | | | | | | | | | Adds build files for //llvm/unittest/[A-D]. Also teach sync_source_lists_from_cmake.py to not complain about missing BUILD.gn files for CMakeLists.txt files that just call add_subdirectory() without calling add_.+_unittest, like e.g. llvm/unittests/Target/CMakeLists.txt. (Omits CodeGen/GlobalISel and DebugInfo/PDB because their build files are somewhat interesting, and this patch is already on the larger side.) Differential Revision: https://reviews.llvm.org/D56212 llvm-svn: 350411
* [gn build] Add check-llvm target and make it workNico Weber2019-01-046-64/+322
| | | | | | | | | | | | | | | | | | | | | With this, check-llvm runs and passes all of clang's lit tests. It doesn't run any of its unit tests yet. This is the only change in the GN build patch series that needs a change to a file outside of llvm/utils/gn: llvm/test/tools/llvm-config/booleans.test checks the result of llvm-config --build-system for some reason, so I'm updating the test to accept "gn" as valid output in addition to "cmake". (The alternative would be to let the gn build self-identify as cmake, which seems worse.) Like with check-clang and check-lld, running just ninja -C out/gn will build all prerequisites needed to run tests, but it won't run the tests (so that the build becomes clean after one build). Running ninja -C out/gn check-llvm will build prerequisites if needed and run the tests. The check-llvm target never becomes clean and runs tests every time. Differential Revision: https://reviews.llvm.org/D56195 llvm-svn: 350410
* [gn build] Add build file for libLTO.dylibNico Weber2019-01-042-1/+45
| | | | | | | | Not used by anything yet, but will be needed to make check-llvm run ld64's libLTO plugin tests. Differential Revision: https://reviews.llvm.org/D56317 llvm-svn: 350409
* [gn build] Add build files for llvm/lib/{LineEditor,Testing/Support,TextAPI}Nico Weber2019-01-046-2/+58
| | | | | | | | | | | Nothing pulls them in yet, but they will be needed for check-llvm. LineEditor depends on libedit, so create a gn/build/lib for it, following the usual pattern. Differential Revision: https://reviews.llvm.org/D56316 llvm-svn: 350407
* [gn build] Make write_cmake_config.py check that each key passed is uniqueNico Weber2019-01-041-0/+3
| | | | | | | | I got that wrong once while locally while working on check-llvm. Reviewed as part of https://reviews.llvm.org/D56195 llvm-svn: 350394
* [WebAssembly] Fixed disassembler not knowing about new brlist operandWouter van Oortmerssen2019-01-031-0/+1
| | | | | | | | | | | | | | Summary: The previously introduced new operand type for br_table didn't have a disassembler implementation, causing an assert. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D56227 llvm-svn: 350366
* Python compat - no explicit reference to Python versionSerge Guelton2019-01-034-4/+4
| | | | | | | | Update documentation and shebang. Differential Revision: https://reviews.llvm.org/D56252 llvm-svn: 350327
* Python compat - iterator protocolSerge Guelton2019-01-031-9/+10
| | | | | | | | In Python2 next() is used wile it's __next__ in Python3. Differential Revision: https://reviews.llvm.org/D56250 llvm-svn: 350326
* Python compat - urllibSerge Guelton2019-01-031-2/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D56261 llvm-svn: 350315
* Python compat - has_key vs. in operatorSerge Guelton2019-01-032-18/+18
| | | | | | | | Use portable `in` operator instead of `has_key(...)` method. Differential Revision: https://reviews.llvm.org/D56260 llvm-svn: 350314
* Python compat - map/filterSerge Guelton2019-01-031-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D56259 llvm-svn: 350313
* Python compat - iteritems() vs. items()Serge Guelton2019-01-032-3/+3
| | | | | | | | Always use `items()` and introduce extra `list(...)` call when needed. Differential Revision: https://reviews.llvm.org/D56257 llvm-svn: 350312
* Pythran compat - range vs. xrangeSerge Guelton2019-01-032-7/+7
| | | | | | | | | Use range instead of xrange whenever possible. The extra list creation in Python2 is generally not a performance bottleneck. Differential Revision: https://reviews.llvm.org/D56253 llvm-svn: 350309
* Python compat - print statementSerge Guelton2019-01-0325-158/+201
| | | | | | | | | Make sure all print statements are compatible with Python 2 and Python3 using the `from __future__ import print_function` statement. Differential Revision: https://reviews.llvm.org/D56249 llvm-svn: 350307
* Fix MSVC visualizer for PointerUnion4Mike Spertus2019-01-031-12/+40
| | | | | | | | Calculate which item is being held and then display it with the appropriate type. We also optimize the display of PointerUnion3 to take advantage of our knowing that the IntMask is always 1 in PointerUnion types llvm-svn: 350280
* [tblgen][disasm] Emit record names again when decoder conflicts occur.Daniel Sanders2019-01-031-1/+1
| | | | | | And add a test for it. llvm-svn: 350277
* MSVC Visualizer for PointerUnion3Mike Spertus2019-01-021-6/+5
| | | | llvm-svn: 350275
* Fix MSVC PointerUnion visualizerMike Spertus2019-01-021-4/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D56186 llvm-svn: 350250
* [gn build] Add fuzzers in llvm/tools that are needed for check-llvmNico Weber2019-01-027-3/+128
| | | | | | | | | | | | Also add a fuzzer() template for defining fuzzers that's similar to add_llvm_fuzzer in the CMake build, and a build file for dependency llvm/lib/FuzzMutate. Also make `assert(defined(...` error strings a bit more self-consistent. Differential Revision: https://reviews.llvm.org/D56194 llvm-svn: 350238
* [gn build] Add build files for bugpoint-passes and LLVMHello pluginsNico Weber2019-01-025-8/+70
| | | | | | | | | | | | These two plugins are loaded into a host process that contains all LLVM symbols, so they don't link against anything. This required minor readjustments to the tablegen() setup of IR. Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56204 llvm-svn: 350234
* [gn build] Add some llvm/tools: lli, lli-child-targetNico Weber2019-01-025-0/+89
| | | | | | | | | | Also add build files for dependencies llvm/lib/ExecutionEngine/{Interpreter,Orc} Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56193 llvm-svn: 350226
* [gn build] Add some llvm/tools: bugpoint, dsymutil, llvm-opt-reportNico Weber2019-01-025-0/+93
| | | | | | | | | | Also add build file for dependency llvm/lib/OptRemarks. Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56192 llvm-svn: 350217
* [gn build] Add some llvm/tools: llvm-c-test, llvm-cfi-verify, llvm-cov, ↵Nico Weber2019-01-026-0/+114
| | | | | | | | | | llvm-cvtres Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56191 llvm-svn: 350216
* [gn build] Add some llvm/tools: llvm-cxxdump, llvm-cxxfilt, llvm-cxxmapNico Weber2019-01-024-0/+61
| | | | | | | | | | Needed for check-llvm. This is the last target reading llvm_install_binutils_symlinks. Differential Revision: https://reviews.llvm.org/D56190 llvm-svn: 350215
* [gn build] Add some llvm/tools: llvm-diff, llvm-dwpNico Weber2019-01-023-0/+58
| | | | | | | | Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56189 llvm-svn: 350214
* [gn build] Add some llvm/tools: llvm-mca, llvm-mtNico Weber2019-01-024-0/+81
| | | | | | | | | | Also add build file for dependency llvm/lib/MCA. Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56166 llvm-svn: 350213
* [gn build] Add some llvm/tools: llvm-size, llvm-split, llvm-stringsNico Weber2019-01-024-0/+90
| | | | | | | | Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56164 llvm-svn: 350212
* [gn build] Add some llvm/tools: llvm-xray, sancov, sanstats, ↵Nico Weber2019-01-027-0/+99
| | | | | | | | | | | | | | verify-uselistorder, yaml-bench Also add build file for dependency llvm/lib/XRay. Needed for check-llvm. (yaml-bench is an llvm/util, not an llvm/tool.) Differential Revision: https://reviews.llvm.org/D56163 llvm-svn: 350211
* [gn build] Add some llvm/tools: llvm-exegesis, llvm-extract, llvm-linkNico Weber2018-12-317-0/+122
| | | | | | | | | | | | | | | | Also add build file for dependency llvm/lib/ExecutionEngine/MCJIT. The exegesis stuff is pretty hairy and knows a lot about Target internals (in general, not specifically in the GN build). I put the llvm-tblgen -gen-exegesis call in llvm/tools/llvm-exegesis/lib/X86, instead of in llvm/lib/Target/X86 where it is in CMake land, and asked on D52932 why it's in that place in the CMake build. Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56167 llvm-svn: 350184
* [gn build] Add some llvm/tools: llvm-rc, llvm-rtdyldNico Weber2018-12-315-0/+78
| | | | | | | | | | | Also add build file for dependencies llvm/lib/ExecutionEngine, llvm/lib/ExecutionEngine/RuntimeDyld. Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56165 llvm-svn: 350183
* [gn build] Make `ninja check-clang` also run Clang's unit testsNico Weber2018-12-3126-19/+540
| | | | | | | | | | | | | | | | | | | | Also add a build file for clang/lib/ASTMatchers/Dynamic, which is only needed by tests (and clang/tools/extra). Also make llvm/utils/gn/build/sync_source_lists_from_cmake.py check that every CMakeLists.txt file below {lld,clang}/unittests has a corresponding BUILD.gn file, so we notice if new test binaries get added (since the failure mode for missing GN build files for tests is just the tests silently not running in the GN build). Also add a unittest() macro for defining unit test targets, and add a lengthy comment there about where the unit test binaries go and why. With this, the build files for //clang are complete. Differential Revision: https://reviews.llvm.org/D56116 llvm-svn: 350171
* [gn build] Add check-clang target and make it workNico Weber2018-12-275-21/+215
| | | | | | | | | | | | | | | With this, check-clang runs and passes all of clang's lit tests. It doesn't run any of its unit tests yet. Like with check-lld, running just ninja -C out/gn will build all prerequisites needed to run tests, but it won't run the tests (so that the build becomes clean after one build). Running ninja -C out/gn check-clang will build prerequisites if needed and run the tests. The check-clang target never becomes clean and runs tests every time. Differential Revision: https://reviews.llvm.org/D56095 llvm-svn: 350108
* [gn build] Make NOSORT line actually workNico Weber2018-12-241-1/+1
| | | | | | | | | | | | | GN wants the NOSORT line to be the first line of a comment block, not the last line. I sent https://gn-review.googlesource.com/c/gn/+/3560 to support having it in the last line too, but since it will be a while until everyone has that change even if it's expected, use the form that works today. Differential Revision: https://reviews.llvm.org/D56065 llvm-svn: 350060
* [gn build] Add build files for clang/tools/{c-arcmt-test,c-index-test} and ↵Nico Weber2018-12-244-1/+132
| | | | | | | | | | | | | their dependency clang/tools/libclang libclang is somewhat incomplete. It's just enough to get check-clang to pass, but that requires it to be pretty complete. The biggest thing is that it's not built as a shared library on Linux. The libclang/BUILD.gn file has a comment with details on what else is missing. Differential Revision: https://reviews.llvm.org/D56059 llvm-svn: 350054
* [gn build] Add build files for ↵Nico Weber2018-12-234-0/+60
| | | | | | | | | | clang/tools/{arcmt-test,clang-check,clang-func-mapping} Needed for check-clang. Differential Revision: https://reviews.llvm.org/D56056 llvm-svn: 350026
* [gn build] Add build files for clang/tools/{clang-refactor,clang-rename}, ↵Nico Weber2018-12-235-0/+75
| | | | | | | | | | clang/utils/hmaptool, clang/lib/Tooling/Refactoring Needed for check-clang. Differential Revision: https://reviews.llvm.org/D56055 llvm-svn: 350025
* [gn build] Add build files for ↵Nico Weber2018-12-236-0/+95
| | | | | | | | | | clang/tools/{clang-diff,clang-import-test,diagtool and clang/lib/Tooling, clang/lib/Tooling/ASTDiff Needed for check-clang. Differential Revision: https://reviews.llvm.org/D56054 llvm-svn: 350024
* [gn build] Embed __TEXT __info_plist section into clang binary on macOSNico Weber2018-12-221-2/+30
| | | | | | | | | Verified by comparing the output of `otool -P bin/clang` between the GN and the CMake build. Differential Revision: https://reviews.llvm.org/D55984 llvm-svn: 349992
* [gn build] Add build files for clang, clang-offload-bundler, and ↵Nico Weber2018-12-224-15/+254
| | | | | | | | | | clang/lib/Headers With this, the GN build can build clang! Differential Revision: https://reviews.llvm.org/D55981 llvm-svn: 349991
* [gn build] Add build files for llvm-cat, llvm-lto, llvm-lto2, ↵Nico Weber2018-12-227-0/+114
| | | | | | | | | | llvm-modextract, llvm-profdata, llvm-symbolizer These are the llvm/tools needed by check-clang. Differential Revision: https://reviews.llvm.org/D56018 llvm-svn: 349989
* [gn build] Add build file for clang/lib/FrontendToolNico Weber2018-12-222-0/+30
| | | | | | Differential Revision: https://reviews.llvm.org/D55980 llvm-svn: 349988
* [gn build] Add build file for clang/lib/ARCMigrateNico Weber2018-12-222-0/+40
| | | | | | Differential Revision: https://reviews.llvm.org/D55979 llvm-svn: 349987
* [gn build] Add build files for clang/lib/{ASTMatchers,CrossTU}, ↵Nico Weber2018-12-227-0/+266
| | | | | | | | | | clang/lib/StaticAnalyzer/{Checkers,Core,Frontend} The intent is to add the build file for clang/lib/StaticAnalyzer/Frontend; everything else is pulled in by that. Differential Revision: https://reviews.llvm.org/D55978 llvm-svn: 349986
* [gn check] Unbreak check-lld if llvm_install_binutils_symlinks is falseNico Weber2018-12-202-6/+8
| | | | | | | | The check-lld target was missing the dependency on llvm-nm and llvm-objdump in that case. Differential Revision: https://reviews.llvm.org/D55941 llvm-svn: 349836
* [gn build] Add build file for clang/lib/CodeGen and ↵Nico Weber2018-12-203-0/+103
| | | | | | | | llvm/lib/ProfileData/Coverage Differential Revision: https://reviews.llvm.org/D55931 llvm-svn: 349834
* [gn build] Add build files for ↵Nico Weber2018-12-205-0/+131
| | | | | | | | clang/lib/{Frontend,Frontend/Rewrite,Serialization} Differential Revision: https://reviews.llvm.org/D55930 llvm-svn: 349833
* [gn build] Add build file for clang/lib/DriverNico Weber2018-12-204-0/+99
| | | | | | | | | Mostly boring, except for the spurious dependency on StaticAnalyzer/Checkers -- see comments in the code. Differential Revision: https://reviews.llvm.org/D55927 llvm-svn: 349832
* [gn build] Add build file for clang/lib/ParseNico Weber2018-12-203-0/+52
| | | | | | | | | | | | | | | | | Nothing really interesting. One thing to consider is where the clang_tablegen() invocations that generate files that are private to a library should be. The CMake build puts them in clang/include/clang/Parse (in this case), but maybe putting them right in clang/lib/Parse/BUILD.gn makes mor sense. (For clang_tablegen() calls that generate .inc files used by the public headers, putting the call in the public BUILD file makes sense.) For now, I've put the build file in the public header folder, since that matches CMake and what I did in the last 2 clang patches, but I'm not sure I like this. Differential Revision: https://reviews.llvm.org/D55925 llvm-svn: 349831
* [gn build] Add build files for clang-format and ↵Nico Weber2018-12-206-6/+88
| | | | | | | | lib/{Format,Rewrite,Tooling/Core,Tooling/Inclusions} Differential Revision: https://reviews.llvm.org/D55924 llvm-svn: 349830
* [gn build] Add build files for clang/lib/{Analysis,Edit,Sema}Nico Weber2018-12-205-0/+166
| | | | | | Differential Revision: https://reviews.llvm.org/D55913 llvm-svn: 349757
OpenPOWER on IntegriCloud