Skip to content

Tweak cfg(not(a, b)) and fix building libstd on arm linux - #12893

Merged
bors merged 2 commits into
rust-lang:masterfrom
alexcrichton:cfg-not
Mar 15, 2014
Merged

Tweak cfg(not(a, b)) and fix building libstd on arm linux#12893
bors merged 2 commits into
rust-lang:masterfrom
alexcrichton:cfg-not

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

The two commits have the details of the two fixes

Previously, the cfg attribute `cfg(not(a, b))` was translated to `(!a && !b)`,
but this isn't very useful because that can already be expressed as
`cfg(not(a), not(b))`. This commit changes the translation to `!(a && b)` which
is more symmetrical of the rest of the `cfg` attribute.

Put another way, I would expect `cfg(clause)` to be the opposite of
`cfg(not(clause))`, but this is not currently the case with multiple element
clauses.
On android, libgcc is missing the _Unwind_GetIP symbol because it's defined as a
macro. This is the same case for arm linux, so this commit adds the necessary
cfgs in place to use the "expanded macro" in rust for arm linux.
@flaper87

Copy link
Copy Markdown
Contributor

We should probably wait for the android slave to be back up before approving this PR

@alexcrichton

Copy link
Copy Markdown
Member Author

This won't get tested on android, this is arm linux which has its own configuration. We don't have a slave testing this.

@luqmana

luqmana commented Mar 15, 2014

Copy link
Copy Markdown
Contributor

Yea, an arm/linux bot would be great. I always build locally to also target it so I'll usually run into stuff like this ever so often.

bors added a commit that referenced this pull request Mar 15, 2014
The two commits have the details of the two fixes
@bors bors closed this Mar 15, 2014
@bors
bors merged commit 8e5ca4b into rust-lang:master Mar 15, 2014
@alexcrichton
alexcrichton deleted the cfg-not branch March 15, 2014 07:34
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 27, 2024
…difiers, r=blyxyas

Add field_scoped_visibility_modifiers lint

changelog: [`field_scoped_visibility_modifiers`]: Add a lint which checks for struct fields using Restricted (not inherited, not public) visibility modifiers.
Sign up for free to 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