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

Updated compiler version detection #82325

Merged

Conversation

MarioLiebisch
Copy link
Contributor

This fixes multiple issues/inconsistencies around get_compiler_version():

  • With no shell allocated, launching the compiler could fail even with proper paths being set.
  • The return value was described as "an array of version numbers as ints", but the function actually returned a Dictionary (or None).
  • Not all calls were properly handling a None return value in case of errors. On Windows this broke compiling for me since Web: Fix version check for missing scalbnf LTO workaround #81869 with default settings.
  • Some calls defined inconsistent defaults/fallbacks (0 or -1).

While I verified these changes under Windows, I currently don't have a build environment for Linux or MacOS ready.

This fixes multiple issues/inconsistencies around  `get_compiler_version()`:
* With no shell allocated, launching the compiler could fail even
  with proper paths being set.
* The return value was described as "an array of version numbers as ints",
  but the function actually returned a `Dictionary` (or `None`).
* Not all calls were properly handling a `None` return value in case of errors.
  On Windows this broke compiling for me since godotengine#81869 with default settings.
* Some calls defined inconsistent defaults/fallbacks (`0` or `-1`).
@MarioLiebisch MarioLiebisch requested review from a team as code owners September 25, 2023 19:19
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Thanks, that was on the back of my mind as something needed indeed.

@akien-mga akien-mga added enhancement topic:buildsystem cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Sep 25, 2023
@akien-mga akien-mga added this to the 4.2 milestone Sep 25, 2023
@akien-mga akien-mga merged commit 43b9e89 into godotengine:master Sep 25, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@MarioLiebisch MarioLiebisch deleted the updated-compiler-version-detection branch September 25, 2023 21:38
@bruvzg
Copy link
Member

bruvzg commented Sep 26, 2023

This breaks macOS build.

@bruvzg
Copy link
Member

bruvzg commented Sep 26, 2023

This breaks macOS build.

Addition of shell=True in particular, the rest seems fine.

@bruvzg bruvzg mentioned this pull request Sep 26, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.3.

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Oct 24, 2023
@akien-mga akien-mga removed cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants