removed -rdynamic flag

This commit is contained in:
Kai Angulo 2024-06-03 02:32:32 -07:00
parent c0e0ab9e3e
commit 00e3feef01
3 changed files with 19 additions and 8 deletions

View file

@ -84,6 +84,10 @@ static EShLanguage c_shader_stage(glslang_stage_t stage)
return EShLangCount;
}
#ifdef __cplusplus
extern "C" {
#endif
GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage)
{
glslang_spv_options_t spv_options {};
@ -138,3 +142,7 @@ GLSLANG_EXPORT char* glslang_SPIRV_disassemble(const unsigned int* spv_words, si
return buffer;
}
#ifdef __cplusplus
}
#endif

View file

@ -28,10 +28,6 @@ pub fn build(b: *Build) !void {
try cppflags.append("-g0");
}
if (tag == .windows and shared) {
try cppflags.append("-rdynamic");
}
try cppflags.append("-std=c++17");
const base_flags = &.{
@ -77,6 +73,8 @@ pub fn build(b: *Build) !void {
.debug = debug,
.shared = shared_tools,
.header_path = path,
.no_link = true,
.no_reduce = true,
})) |dep| {
tools_lib = dep.artifact("SPIRV-Tools");
tools_opt = dep.artifact("SPIRV-Tools-opt");
@ -180,10 +178,6 @@ pub fn build(b: *Build) !void {
.target = target,
});
if (shared) {
glslang_exe.defineCMacro("GLSLANG_IS_SHARED_LIBRARY", "");
}
const install_glslang_step = b.step("glslang-standalone", "Build and install glslang.exe");
install_glslang_step.dependOn(&b.addInstallArtifact(glslang_exe, .{}).step);
glslang_exe.addCSourceFiles(.{
@ -247,6 +241,7 @@ pub fn build(b: *Build) !void {
fn addIncludes(step: *std.Build.Step.Compile) void {
step.addIncludePath(.{ .path = sdkPath("/" ++ output_path) });
step.addIncludePath(.{ .path = sdkPath("/") });
step.addIncludePath(.{ .path = sdkPath("/External/spirv-tools/include") });
}
fn ensureCommandExists(allocator: std.mem.Allocator, name: []const u8, exist_check: []const u8) bool {

View file

@ -141,6 +141,10 @@ private:
void* context;
};
#ifdef __cplusplus
extern "C" {
#endif
GLSLANG_EXPORT int glslang_initialize_process() { return static_cast<int>(glslang::InitializeProcess()); }
GLSLANG_EXPORT void glslang_finalize_process() { glslang::FinalizeProcess(); }
@ -480,3 +484,7 @@ GLSLANG_EXPORT const char* glslang_program_get_info_debug_log(glslang_program_t*
{
return program->program->getInfoDebugLog();
}
#ifdef __cplusplus
}
#endif