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

Statically link mingw/msvc runtime libraries on Windows #1203

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Aug 8, 2023

This builds on PR #1082, implementing the requested review, and removing some changes that seem unrelated to the goal of the PR.

This is still a draft because I haven't yet had a chance to try the MSVC-related changes. However, this is working in my testing with mingw.

Thanks to @feiyunw for making the original PR!

Fixes #1064
Fixes #976

@dsnopek dsnopek added bug This has been identified as a bug enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup labels Aug 8, 2023
@dsnopek dsnopek requested review from Calinou and bruvzg August 8, 2023 20:23
@dsnopek dsnopek requested a review from a team as a code owner August 8, 2023 20:24
@dsnopek dsnopek marked this pull request as draft August 8, 2023 20:25
@dsnopek dsnopek force-pushed the 1082-update branch 2 times, most recently from 1789aae to 54515da Compare August 8, 2023 20:35
tools/targets.py Outdated Show resolved Hide resolved
tools/windows.py Outdated Show resolved Hide resolved
Co-authored-by: David Snopek <dsnopek@gmail.com>
@dsnopek
Copy link
Collaborator Author

dsnopek commented Aug 9, 2023

Alright, I've tested this with MSVC and it seems to be working! So, I'm taking it out of "draft" now :-)

@dsnopek dsnopek marked this pull request as ready for review August 9, 2023 18:54
else:
env.Append(CCFLAGS=["/MD"])
elif env["optimize"] == "debug" or env["optimize"] == "none":
env.Append(CCFLAGS=["/Od"])

else:
if env["debug_symbols"]:
Copy link
Member

Choose a reason for hiding this comment

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

Another potential sync with Godot, to add here:

            # Adding dwarf-4 explicitly makes stacktraces work with clang builds,
            # otherwise addr2line doesn't understand them
            env.Append(CCFLAGS=["-gdwarf-4"])

But that can also go in another PR.

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.

Looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup
Projects
None yet
4 participants