Skip to content

Commit 26aaff0

Browse files
committed
Print compile/link logs to stderr
When glslang is integrated into a build system (like Meson), stdout is stored in an output file and stderr is printed to the user. This hides error messages from the user. See: mesonbuild/meson#11506 stderr is the standard stream errors should get printed to, always use that.
1 parent 1399733 commit 26aaff0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

StandAlone/StandAlone.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,9 +1506,9 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
15061506
if (! (Options & EOptionSuppressInfolog) &&
15071507
! (Options & EOptionMemoryLeakMode)) {
15081508
if (!beQuiet)
1509-
PutsIfNonEmpty(compUnit.fileName[0].c_str());
1510-
PutsIfNonEmpty(shader->getInfoLog());
1511-
PutsIfNonEmpty(shader->getInfoDebugLog());
1509+
StderrIfNonEmpty(compUnit.fileName[0].c_str());
1510+
StderrIfNonEmpty(shader->getInfoLog());
1511+
StderrIfNonEmpty(shader->getInfoDebugLog());
15121512
}
15131513
}
15141514

@@ -1529,8 +1529,8 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
15291529

15301530
// Report
15311531
if (!(Options & EOptionSuppressInfolog) && !(Options & EOptionMemoryLeakMode)) {
1532-
PutsIfNonEmpty(program.getInfoLog());
1533-
PutsIfNonEmpty(program.getInfoDebugLog());
1532+
StderrIfNonEmpty(program.getInfoLog());
1533+
StderrIfNonEmpty(program.getInfoDebugLog());
15341534
}
15351535

15361536
// Reflect

Test/runtests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ -d "${LIBPATH}" ]; then
1616
fi
1717

1818
function run {
19-
"$EXE" "$@"
19+
"$EXE" "$@" 2>&1
2020
result=$?
2121
case "$result" in
2222
[0-6]) # Valid success and error codes

0 commit comments

Comments
 (0)