Skip to content

[2.7] bpo-32616: Disable computed gotos by default for clang < 5#5574

Merged
methane merged 2 commits intopython:2.7from
methane:disable-computed-gotos-clang4
Feb 7, 2018
Merged

[2.7] bpo-32616: Disable computed gotos by default for clang < 5#5574
methane merged 2 commits intopython:2.7from
methane:disable-computed-gotos-clang4

Conversation

@methane
Copy link
Copy Markdown
Member

@methane methane commented Feb 7, 2018

@methane methane added the performance Performance or resource usage label Feb 7, 2018
@methane methane requested a review from benjaminp February 7, 2018 02:27
@methane methane changed the title bpo-32616: Disable computed gotos by default for clang < 5 [2.7] bpo-32616: Disable computed gotos by default for clang < 5 Feb 7, 2018
@benjaminp
Copy link
Copy Markdown
Contributor

We should probably put this check in configure.ac, so that configure doesn't claim we're going to use computed use gotos while we silently don't. (You could just stick the ifdef into the AC_RUN_IFELSE.)

@methane
Copy link
Copy Markdown
Member Author

methane commented Feb 7, 2018

I'm sorry, I'm not familiar with configure.ac.
As my understanding, configure just define HAVE_COMPUTED_GOTOS automatically.
USE_COMPUTED_GOTOS is never defined automatically, unless --with(out)-computed-gotos
is specified.

This pull request is just change behavior when USE_COMPUTED_GOTOS is not defined.

@methane
Copy link
Copy Markdown
Member Author

methane commented Feb 7, 2018

This is output of configure script:

checking for socklen_t... yes
checking for build directories... checking for --with-computed-gotos... no value specified
checking whether gcc -pthread supports computed gotos... yes
done

@methane methane merged commit 2942b90 into python:2.7 Feb 7, 2018
@methane methane deleted the disable-computed-gotos-clang4 branch February 7, 2018 10:09
@ilovezfs
Copy link
Copy Markdown

@methane @benjaminp unfortunately this issue still affects Python 2.7.15rc1 because in Xcode 9.x, the value of __clang_major__ is 9.

@methane
Copy link
Copy Markdown
Member Author

methane commented Apr 16, 2018

@ilovezfs We know, but there is no easy fix for it. See https://bugs.python.org/issue32616 for continued discussion.

@p0six
Copy link
Copy Markdown

p0six commented Apr 29, 2018

So is this now considered resolved for High Sierra users via 2.7.15rc1?

@ilovezfs
Copy link
Copy Markdown

@p0six no. You still must manually pass --without-computed-gotos to configure if you're building from source.

@ilovezfs
Copy link
Copy Markdown

@p0six however, Xcode >= 9.3 is apparently unaffected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance or resource usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants