Skip to content

disallow specification of both -dynamic and -static simultaneously when calling zig build-exe - #8258

Closed
elerch wants to merge 1 commit into
ziglang:masterfrom
elerch:cli-no-static-dynamic
Closed

disallow specification of both -dynamic and -static simultaneously when calling zig build-exe#8258
elerch wants to merge 1 commit into
ziglang:masterfrom
elerch:cli-no-static-dynamic

Conversation

@elerch

Copy link
Copy Markdown
Contributor

As it says on the tin. See discussion in #8248

@ifreundifreund left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this is a desirable change. The current behavior of the flag set later in the command line overriding any previous flags setting the same thing is inline with the behavior of all other flags. For example, all of the -ffoo/-fno-foo options work this way.

@elerch

Copy link
Copy Markdown
ContributorAuthor

I'm not offended either way - it was just the discussion on the other PR so I thought I'd offer the code for consideration.

/cc @data-man@tauoverpi

@data-man

Copy link
Copy Markdown
Contributor

For example, all of the -ffoo/-fno-foo options work this way.

And it's bad.

clang <some_file> -dynamic -static

clang-11: error: invalid argument '-dynamic' not allowed with '-static'

@Vexu

Vexu commented Jun 10, 2021

Copy link
Copy Markdown
Member

Hi @elerch, we discussed this in the self hosted compiler meeting and decided that the current behavior of them being able to override each other is desirable. However I have opened #9071 proposal to rename the flags to make this behavior more obvious.

@VexuVexu closed this Jun 10, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@elerch@data-man@Vexu@ifreund