-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate LLD for MSVC targets; prepare for other targets #2142
Merged
+892
−738
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ec1a54a
Move static lib generation from driver/linker.cpp to driver/archiver.cpp
kinke cb0c27c
Refactor MSVC link.exe driver into dedicated driver/linker-msvc.cpp
kinke ecbfa0e
Move GCC driver to dedicated driver/linker-gcc.cpp
kinke 9c86ae9
Refactor generation of GCC linker command line
kinke 1339c02
Incorporate LTO stuff in GCC ArgsBuilder
kinke 9416d33
Introduce ArgsBuilder::addLdFlag()
kinke ede2364
Add first version of ld linker driver as ArgsBuilder specialization
kinke 00d5f9b
Integrate LLD for MSVC targets via experimental CMake option LDC_WITH…
kinke 9fd7fa2
Add experimental -link-internally switch to enable LLD opt-in
kinke 383c2d3
Range-ify usages of front-end Arrays
kinke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,19 @@ | ||
//===-- driver/archiver.h - Creating static libs via LLVM--------*- C++ -*-===// | ||
//===-- driver/archiver.h - Creating static libraries -----------*- C++ -*-===// | ||
// | ||
// LDC � the LLVM D compiler | ||
// | ||
// This file is distributed under the BSD-style LDC license. See the LICENSE | ||
// file for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// Provides an interface to LLVM built-in static lib generation via llvm-lib | ||
// (MSVC targets) or llvm-ar (all other targets). | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LDC_DRIVER_ARCHIVER_H | ||
#define LDC_DRIVER_ARCHIVER_H | ||
|
||
#if LDC_LLVM_VER >= 309 | ||
#include "llvm/ADT/ArrayRef.h" | ||
|
||
namespace ldc { | ||
int ar(llvm::ArrayRef<const char *> args); | ||
int lib(llvm::ArrayRef<const char *> args); | ||
} | ||
#endif // LDC_LLVM_VER >= 309 | ||
/** | ||
* Create a static library from object files. | ||
* @return 0 on success. | ||
*/ | ||
int createStaticLibrary(); | ||
|
||
#endif // !LDC_DRIVER_ARCHIVER_H |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an equivalent of
llvm-config
for this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I've seen, in fact I didn't find anything about how to embed LLD via CMake. On Linux the order matters (even inbetween these 3 new libs), so I put them in front. As the LLD libs don't have the
LLVM
prefix, we can't specify them infind_package()
...