mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-12 22:14:54 +03:00
Add -link-defaultlib-shared and rename -link-debuglib (#2443)
... to -link-defaultlib-debug (with alias for backwards compatibility). -link-defaultlib-shared is to be used for switching between static and shared default libs to be linked with. It defaults to true when generating shared libraries (if shared druntime/Phobos are supported for the target, i.e., not for Windows). This is a benign breaking change!
This commit is contained in:
parent
3e543120fd
commit
1572c91fc0
11 changed files with 76 additions and 38 deletions
|
@ -20,11 +20,6 @@
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static llvm::cl::opt<llvm::cl::boolOrDefault>
|
||||
staticFlag("static", llvm::cl::ZeroOrMore,
|
||||
llvm::cl::desc("Create a statically linked binary, including "
|
||||
"all system dependencies"));
|
||||
|
||||
#if LDC_WITH_LLD
|
||||
static llvm::cl::opt<bool>
|
||||
useInternalLinker("link-internally", llvm::cl::ZeroOrMore, llvm::cl::Hidden,
|
||||
|
@ -134,10 +129,10 @@ int linkObjToBinary() {
|
|||
createDirectoryForFileOrFail(gExePath);
|
||||
|
||||
if (global.params.targetTriple->isWindowsMSVCEnvironment()) {
|
||||
return linkObjToBinaryMSVC(gExePath, useInternalLinker, staticFlag);
|
||||
return linkObjToBinaryMSVC(gExePath, useInternalLinker, opts::staticFlag);
|
||||
}
|
||||
|
||||
return linkObjToBinaryGcc(gExePath, useInternalLinker, staticFlag);
|
||||
return linkObjToBinaryGcc(gExePath, useInternalLinker, opts::staticFlag);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue