Deprecate "relaxProperties", remove the default -property switch and warn about using them. Fixes #73.
1 parent 570cbbe commit 6246a741b9f073e6ae9c638cc06f854058d0708a
@Sönke Ludwig Sönke Ludwig authored on 30 May 2013
Showing 4 changed files
View
8
source/dub/compilers/compiler.d
string[] flags;
string alternative;
}
static immutable SpecialFlag[] s_specialFlags = [
{["-c", "-o-", "-property", "-fproperty", "-w", "-Wall", "-Werr"], "Automatically issued by DUB, do not specify in package.json"},
{["-c", "-o-"], "Automatically issued by DUB, do not specify in package.json"},
{[ "-w", "-Wall", "-Werr"], `Use "buildRequirements" to control warning behavior`},
{["-property", "-fproperty"], "Using this flag may break building of dependencies and it will probably be removed from DMD in the future"},
{["-wi"], `Use the "buildRequirements" field to control warning behavior`},
{["-d", "-de", "-dw"], `Use the "buildRequirements" field to control deprecation behavior`},
{["-of"], `Use "targetPath" and "targetName" to customize the output file`},
{["-debug", "-fdebug", "-g"], "Call dub with --build=debug"},
disallowInlining = 1<<4, /// Avoid function inlining, even in release builds
disallowOptimization = 1<<5, /// Avoid optimizations, even in release builds
requireBoundsCheck = 1<<6, /// Always perform bounds checks
requireContracts = 1<<7, /// Leave assertions and contracts enabled in release builds
relaxProperties = 1<<8, /// Do not enforce strict property handling (-property)
relaxProperties = 1<<8, /// DEPRECATED: Do not enforce strict property handling (-property)
noDefaultFlags = 1<<9, /// Do not issue any of the default build flags (e.g. -debug, -w, -property etc.) - use only for development purposes
}
 
string getTargetFileName(in BuildSettings settings, in BuildPlatform platform)
View
2
■■■
source/dub/generators/build.d
 
auto buildsettings = settings.buildSettings;
m_project.addBuildSettings(buildsettings, settings.platform, settings.config);
bool usedefflags = !(buildsettings.requirements & BuildRequirements.noDefaultFlags);
if (usedefflags) buildsettings.addDFlags(["-w", "-property"]);
if (usedefflags) buildsettings.addDFlags(["-w"]);
string dflags = environment.get("DFLAGS");
if( dflags.length ){
settings.buildType = "$DFLAGS";
buildsettings.addDFlags(dflags.split());
View
source/dub/generators/rdmd.d
View
source/dub/package_.d