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

clang mingw driver -mconsole doesn't override earlier -mwindows #50638

Closed
jeremyd2019 opened this issue Jul 31, 2021 · 4 comments
Closed

clang mingw driver -mconsole doesn't override earlier -mwindows #50638

jeremyd2019 opened this issue Jul 31, 2021 · 4 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@jeremyd2019
Copy link
Contributor

Bugzilla Link 51296
Resolution FIXED
Resolved on Oct 11, 2021 20:29
Version 12.0
OS Windows NT
Blocks #51489
Attachments response file showing clang arguments
CC @mstorsjo,@tstellar
Fixed by commit(s) ce49fd0 58811fd

Extended Description

I'm running into a situation where a pkg-config file is providing a -mwindows argument, but later the program being built explicitly specified -mconsole. On gcc, this seems to be respected but with clang -mwindows seems to always win.

if (Args.hasArg(options::OPT_mwindows)) {
CmdArgs.push_back("--subsystem");
CmdArgs.push_back("windows");
} else if (Args.hasArg(options::OPT_mconsole)) {
CmdArgs.push_back("--subsystem");
CmdArgs.push_back("console");
}

@jeremyd2019
Copy link
Contributor Author

This was fixed in ce49fd0

@mstorsjo
Copy link
Member

mstorsjo commented Aug 5, 2021

I think this one is small and trivial enough to warrant backporting to 13.x.

@tstellar
Copy link
Collaborator

Merged: 58811fd

@tstellar
Copy link
Collaborator

mentioned in issue #51489

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

3 participants