Skip to content

Fix different C runtimes on Windows#84

Open
ark0f wants to merge 2 commits into
pepyakin:masterfrom
gear-tech:al-win-crt
Open

Fix different C runtimes on Windows#84
ark0f wants to merge 2 commits into
pepyakin:masterfrom
gear-tech:al-win-crt

Conversation

@ark0f
Copy link
Copy Markdown

@ark0f ark0f commented Feb 27, 2023

No description provided.

Comment thread wabt-sys/build.rs Outdated
}

// `cc` crate tracks target features when CMake just builds with dynamic C runtime
cfg.static_crt(false);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

IMHO it is better to configure CMake accordingly. If I'm not mistaken build type should be set explicitly via https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html since the default value is empty string. RelWithDebInfo/Release should be a good choice.

For selecting static/dynamic runtime library the config variable https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html can be used.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

If I'm not mistaken build type should be set explicitly via cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html

cmake crate already handles it

the config variable cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html can be used.

Done

@Slyker
Copy link
Copy Markdown

Slyker commented May 18, 2024

Hey thanks for this PR i was able to compile and use fine on windows !

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.

3 participants