Skip to content

Comments

Add [Environment{arch}] DFLAGS to -v output#7937

Merged
dlang-bot merged 1 commit intodlang:masterfrom
JinShil:dflags2
Mar 2, 2018
Merged

Add [Environment{arch}] DFLAGS to -v output#7937
dlang-bot merged 1 commit intodlang:masterfrom
JinShil:dflags2

Conversation

@JinShil
Copy link
Contributor

@JinShil JinShil commented Feb 21, 2018

Followup to #7865

#7865 printed DFLAGS from the dflags local variable. The dflags local variable was populated from the [Environment] section of the config file, but was never populated from the architecture-specific section of the config file (i.e. [Environment64])

This PR defers reading DFLAGS from the environment string table until needed in the -v output, by which time the architecture-specific section of the config file has already been parsed.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @JinShil!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

environment.reset(7); // erase cached environment updates
arch = parse_arch_arg(&dflags, arch);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dflags is never used after this point, and will actually contain incomplete information after the [Environment{arch}] section is parsed, so it is placed in it's own scope.

src/dmd/mars.d Outdated
environment.update("LIB", 3).ptrvalue = null;

// read from DFLAGS in [Environment{arch}] section
char[80] envsection;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= void;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dlang-bot dlang-bot merged commit 7b17c9f into dlang:master Mar 2, 2018
@JinShil JinShil deleted the dflags2 branch March 3, 2018 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants