Merge pull request #688 from dlang/fix_issue_618
Fix library extensions for LDC when using the MS linker. Fixes #618.
commit 8f87d9f8413d9e962331accd26d7ccee9ab69b35
2 parents 249f4c6 + 9c2c118
@Sönke Ludwig Sönke Ludwig authored on 27 May 2016
Showing 8 changed files
View
3
■■
source/dub/compilers/compiler.d
 
/// Removes any dflags that match one of the BuildOptions values and populates the BuildSettings.options field.
void extractBuildOptions(ref BuildSettings settings) const;
 
/// Computes the full file name of the generated binary.
string getTargetFileName(in BuildSettings settings, in BuildPlatform platform) const;
 
/// Adds the appropriate flag to set a target path
void setTarget(ref BuildSettings settings, in BuildPlatform platform, string targetPath = null) const;
 
/// Invokes the compiler using the given flags
View
27
source/dub/compilers/dmd.d
}
settings.dflags = newflags.data;
}
 
string getTargetFileName(in BuildSettings settings, in BuildPlatform platform)
const {
assert(settings.targetName.length > 0, "No target name set.");
final switch (settings.targetType) {
case TargetType.autodetect: assert(false, "Configurations must have a concrete target type.");
case TargetType.none: return null;
case TargetType.sourceLibrary: return null;
case TargetType.executable:
if (platform.platform.canFind("windows"))
return settings.targetName ~ ".exe";
else return settings.targetName;
case TargetType.library:
case TargetType.staticLibrary:
if (platform.platform.canFind("windows"))
return settings.targetName ~ ".lib";
else return "lib" ~ settings.targetName ~ ".a";
case TargetType.dynamicLibrary:
if (platform.platform.canFind("windows"))
return settings.targetName ~ ".dll";
else return "lib" ~ settings.targetName ~ ".so";
case TargetType.object:
if (platform.platform.canFind("windows"))
return settings.targetName ~ ".obj";
else return settings.targetName ~ ".o";
}
}
 
void setTarget(ref BuildSettings settings, in BuildPlatform platform, string tpath = null) const
{
final switch (settings.targetType) {
case TargetType.autodetect: assert(false, "Invalid target type: autodetect");
View
source/dub/compilers/gdc.d
View
source/dub/compilers/ldc.d
View
source/dub/compilers/utils.d
View
source/dub/generators/build.d
View
source/dub/generators/targetdescription.d
View
source/dub/package_.d