- Dec 05, 2017
-
-
Shoaib Meenai authored
We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319840 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 08, 2017
-
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312766 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 06, 2017
-
-
Dimitry Andric authored
Summary: Other llvm tools display their registered targets when showing version information, but for some reason clang has never done this. To support this, D33899 adds the llvm parts, which make it possible to print version information to arbitrary raw_ostreams. This change adds a call to printRegisteredTargetsForVersion in clang's PrintVersion, and adds a raw_ostream parameter to two other PrintVersion functions. Reviewers: beanz, chandlerc, dberris, mehdi_amini, zturner Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33900 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304836 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 30, 2017
-
-
Simon Pilgrim authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299083 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 28, 2017
-
-
Matthias Braun authored
dump() is only available in debug builds and meant for debugger usage, normal code should use something like print(errs()); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293364 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 19, 2016
-
-
Chris Bieneman authored
I broke this in r287406 and r287407. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287463 91177308-0d34-0410-b5e6-96231b3b80d8
-
Chris Bieneman authored
ClangOffloadBundler.cpp has the following include chain: llvm/Bitcode/BitcodeWriter.h llvm/IR/ModuleSummaryIndex.h llvm/IR/Module.h llvm/IR/Function.h llvm/IR/Argument.h llvm/IR/Attributes.h llvm/IR/Attributes.gen This means clang-offload-bundler needs to depend on intrinsics_gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287406 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 11, 2016
-
-
Teresa Johnson authored
The change in D26502 splits ReaderWriter.h, which contains the APIs into both the BitReader and BitWriter libraries, into BitcodeReader.h and BitcodeWriter.h. Change clang uses to the appropriate split header(s). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286567 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 07, 2016
-
-
Eugene Zelenko authored
[clang-offload-bundler] Fix some Clang-tidy modernize-use-override and Include What You Use warnings; other minor fixes. Differential revision: https://reviews.llvm.org/D24165 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280828 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 25, 2016
-
-
Vitaly Buka authored
Summary: 1. Pair removed from StringMap was not destroyed 2. ObjectFile had no owner Reviewers: sfantao Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23865 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279722 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 24, 2016
-
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279641 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: This patch adds the capability to bundle object files in sections of the host binary using a designated naming convention for these sections. This patch uses the functionality of the object reader already in the LLVM library to read bundled files, and invokes clang with the incremental linking options to create bundle files. Bundling files involves creating an IR file with the contents of the bundle assigned as initializers of globals binded to the designated sections. This way the bundling implementation is agnostic of the host object format. The features added by this patch were requested in the RFC discussion in http://lists.llvm.org/pipermail/cfe-dev/2016-February/047547.html. Reviewers: echristo, tra, jlebar, hfinkel, ABataev, Hahnfeld Subscribers: mkuron, whchung, cfe-commits, andreybokhanko, Hahnfeld, arpith-jacob, carlo.bertolli, mehdi_amini, caomhin Differential Revision: https://reviews.llvm.org/D21851 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279634 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: One of the goals of programming models that support offloading (e.g. OpenMP) is to enable users to offload with little effort, by annotating the code with a few pragmas. I'd also like to save users the trouble of changing their existent applications' build system. So having the compiler always return a single file instead of one for the host and each target even if the user is doing separate compilation is desirable. This diff proposes a tool named clang-offload-bundler (happy to change the name if required) that is used to bundle files associated with the same user source file but different targets, or to unbundle a file into separate files associated with different targets. This tool supports the driver support for OpenMP under review in http://reviews.llvm.org/D9888. The tool is used there to enable separate compilation, so that the very first action on input files that are not source files is a "unbundling action" and the very last non-linking action is a "bundling action". The format of the bundled files is currently very simple: text formats are concatenated with comments that have a magic string and target identifying triple in between, and binary formats have a header that contains the triple and the offset and size of the code for host and each target. The goal is to improve this tool in the future to deal with archive files so that each individual file in the archive is properly dealt with. We see that archives are very commonly used in current applications to combine separate compilation results. So I'm convinced users would enjoy this feature. This tool can be used like this: `clang-offload-bundler -targets=triple1,triple2 -type=ii -inputs=a.triple1.ii,a.triple2.ii -outputs=a.ii` or `clang-offload-bundler -targets=triple1,triple2 -type=ii -outputs=a.triple1.ii,a.triple2.ii -inputs=a.ii -unbundle` I implemented the tool under clang/tools. Please let me know if something like this should live somewhere else. This patch is prerequisite for http://reviews.llvm.org/D9888. Reviewers: hfinkel, rsmith, echristo, chandlerc, tra, jlebar, ABataev, Hahnfeld Subscribers: whchung, caomhin, andreybokhanko, arpith-jacob, carlo.bertolli, mehdi_amini, guansong, Hahnfeld, cfe-commits Differential Revision: https://reviews.llvm.org/D13909 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279632 91177308-0d34-0410-b5e6-96231b3b80d8
-