Skip to content
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

Rewrite test6952 to be independent of the CC variable #11053

Merged
merged 1 commit into from
Apr 26, 2020

Conversation

Geod24
Copy link
Member

@Geod24 Geod24 commented Apr 22, 2020

This was an issue on other platforms, as CC might be gcc, cc,
clang, sometimes even c++, g++ or clang++.
Instead of dealing with that, just provide our own wrapper script
which writes the arguments passed to it, and voila.

@Geod24 Geod24 added the Refactoring No semantic changes to code label Apr 22, 2020
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @Geod24!

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.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#11053"

@Geod24 Geod24 mentioned this pull request Apr 22, 2020
10 tasks
Copy link
Contributor

@lionello lionello left a comment

Choose a reason for hiding this comment

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

The compiler always prints the value of CC so couldn't we instead just look for that value?

@Geod24
Copy link
Member Author

Geod24 commented Apr 22, 2020

We could, but depending on whatever's in the environment is quite brittle IMO. You experienced it yourself: changes to CC can be done from the calling Makefiles to affect other tests, and will mistakenly affect this one as well.

Additionally, the output of -v isn't what one can consider a stable API. What if one day someone decides to output all the environment variables that affect compilation (for easily-reproducible build) ? IMO removing the part that can change from the equation is much more robust long term.

This was an issue on other platforms, as CC might be gcc, cc,
clang, sometimes even c++, g++ or clang++.
Instead of dealing with that, just provide our own wrapper script
which writes the arguments passed to it, and voila.
@dlang-bot dlang-bot merged commit 8df5e13 into dlang:master Apr 26, 2020
@Geod24 Geod24 deleted the fix-test6952 branch April 26, 2020 12:13
lionello added a commit to lionello/nixpkgs that referenced this pull request Apr 28, 2020
lionello added a commit to lionello/nixpkgs that referenced this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Refactoring No semantic changes to code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants