Skip to content

Commit 3355a00

Browse files
committed
meson: Vendor glslang
1 parent 2dc89d6 commit 3355a00

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ override_dh_auto_configure:
6363

6464
override_dh_auto_build:
6565
./build.sh ${XEMU_BUILD_OPTIONS} ${common_configure_opts} || \
66-
{ echo ===== BUILD FAILED ===; tail -n 50 config.log; exit 1; }
66+
{ echo ===== BUILD FAILED ===; cat build/meson-logs/meson-log.txt; exit 1; }
6767
cp debian/copyright debian/qemu.deb.copyright
6868
cp dist/LICENSE.txt debian/copyright
6969

meson.build

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,10 +1174,10 @@ if not get_option('opengl').auto() or have_system or have_vhost_user_gpu
11741174
endif
11751175

11761176
vulkan = not_found
1177+
libglslang = not_found
1178+
11771179
if targetos == 'windows'
1178-
vulkan = declare_dependency(
1179-
compile_args: ['-DVK_USE_PLATFORM_WIN32_KHR', '-DVK_NO_PROTOTYPES'],
1180-
)
1180+
vulkan = declare_dependency(compile_args: ['-DVK_USE_PLATFORM_WIN32_KHR'])
11811181
libglslang = declare_dependency(link_args: [
11821182
'-lglslang',
11831183
'-lMachineIndependent',
@@ -1188,14 +1188,21 @@ if targetos == 'windows'
11881188
])
11891189
elif targetos == 'linux'
11901190
vulkan = dependency('vulkan')
1191-
libglslang = declare_dependency(link_args: [
1192-
'-lglslang',
1193-
'-lMachineIndependent',
1194-
'-lGenericCodeGen',
1195-
'-lSPIRV',
1196-
'-lSPIRV-Tools',
1197-
'-lSPIRV-Tools-opt'
1198-
])
1191+
endif
1192+
1193+
if vulkan.found() and not libglslang.found()
1194+
cmake = import('cmake')
1195+
# FIXME: Get spirv-tools to enable opt.
1196+
glslang_opts = cmake.subproject_options()
1197+
glslang_opts.add_cmake_defines({'ENABLE_OPT': false})
1198+
glslang_subpro = cmake.subproject('glslang', options: glslang_opts)
1199+
libglslang = declare_dependency(link_with: [
1200+
glslang_subpro.target('glslang'),
1201+
glslang_subpro.target('MachineIndependent'),
1202+
glslang_subpro.target('GenericCodeGen'),
1203+
glslang_subpro.target('SPIRV'),
1204+
], include_directories: ['subprojects' / 'glslang']
1205+
)
11991206
endif
12001207

12011208
subdir('thirdparty')

subprojects/glslang.wrap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[wrap-git]
2+
url=https://github.com/KhronosGroup/glslang
3+
revision=vulkan-sdk-1.3.283.0
4+
depth=1

0 commit comments

Comments
 (0)