KhronosGroup / KhronosGroup/glslang

Windows Clang build requires PATH to find common C++ runtime

Open
#2,563 2 comments 0 reactions 1 assignee Claimed by @dneto0 View on GitHub
bug Infrastructure
Dominant language
C++
Stars
3.6k
Forks
989
Avg merge
1d 2h
Merged PRs (30d)
31

Description

Spawned by https://github.com/android/ndk/issues/1464

> On Windows, the CMake files try to link these executables' STL stuff statically. glslc.exe is configured using the [shaderc_default_compile_options](https://android.googlesource.com/platform/external/shaderc/shaderc/+/9c602842f9386ec12d53b31fbd70f1d596775f58/cmake/utils.cmake#59) CMake function. The logic here is to add -static -static-libgcc -static-libstdc++ if NOT "${MSVC}" and WIN32. This works, and glslc.exe has no dynamic STL/libgcc dependency.

> There is another copy of this static-linking logic for [glslang](https://android.googlesource.com/platform/external/shaderc/glslang/+/d1037b62f6321bec77aa96f3b59a86847daa4885/CMakeLists.txt#222), which uses WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU".

> My guess is that the right logic is: WIN32 AND NOT MSVC.

This issue tracks updating the conditions for static linking the C++ runtime to also cover the Clang build.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.