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

Factor out code for windows abi tags. #3004

Merged
merged 18 commits into from Feb 15, 2018

Conversation

bredelings
Copy link
Contributor

No description provided.

if mesonlib.for_windows(self.want_cross, self.env):
comp_ts_version = self.env.detect_cpp_compiler(self.want_cross).get_toolset_version()
compiler_ts = comp_ts_version.split('.')
#FIXME - what about other compilers?
Copy link
Member

Choose a reason for hiding this comment

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

[Flake8]

[E265] block comment should start with '# '

#FIXME - what about other compilers?
tag = 'vc{}{}'.format(compiler_ts[0], compiler_ts[1])

tag = '-' + tag;
Copy link
Member

Choose a reason for hiding this comment

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

[Flake8]

[E703] statement ends with a semicolon

# FIXME - how to handle different distributions, e.g. for Mac? Currently we handle homebrew and macports, but not fink.
def abi_tag(self):
if mesonlib.for_windows(self.want_cross, self.env):
tag = self.compiler_tag()+self.threading_tag()
Copy link
Member

Choose a reason for hiding this comment

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

[Flake8]

[E226] missing whitespace around arithmetic operator

@jpakkane
Copy link
Member

jpakkane commented Feb 3, 2018

The boost failure does seem relevant as ABI tags may be confusing the lookup logic somehow.

@bredelings
Copy link
Contributor Author

bredelings commented Feb 3, 2018 via email

# FIXME - how to handle different distributions, e.g. for Mac? Currently we handle homebrew and macports, but not fink.
def abi_tag(self):
if mesonlib.for_windows(self.want_cross, self.env):
# PROBLEM: mingw just uses self.threading_tag()
Copy link
Member

Choose a reason for hiding this comment

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

[Flake8]

[W291] trailing whitespace

@bredelings
Copy link
Contributor Author

Fixes #2990

@bredelings
Copy link
Contributor Author

Fixes #2631

@bredelings
Copy link
Contributor Author

bredelings commented Feb 8, 2018

@jpakkane This series

  • factors out abi tags (which should cause no functional change)
  • uses find_library to search for boost libraries on windows, as well as unix (common code is shared)
  • allow searching over more than one abi tag (useful on windows)
  • uses for_windows( ) instead of is_windows( ) (fixes logic for cross)
  • doesn't crash when using a compiler that is not msvc (toolset_version is not defined for gcc!)

This cleanup allows me to cross-compile from linux to windows using mingw-w64, which several people have filed issues about. What do you think?

@bredelings
Copy link
Contributor Author

@nirbheek Any comments?

@nirbheek
Copy link
Member

I can't review in detail, but this sounds good to me in principle. Maybe @NickeZ can review?

@jpakkane
Copy link
Member

Given that Boost is ununderstandable, I'm fine with merging this since it fixes an important use case. Any objections?

@jpakkane jpakkane merged commit 6257fe9 into mesonbuild:master Feb 15, 2018
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.

None yet

4 participants