Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2442)
* Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2408)
* Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output.
Improve documentation on existing SpirvToolsDisassemble interface.
* Update pre-processor check - following existing ENABLE_OPT checks.
* Fix not-found header paths for glslangValidator and glslangtests.
* Add spirv_tools/include path where there is an ENABLE_OPT=1 in the BUILD.gn configuration.
diff --git a/BUILD.gn b/BUILD.gn
index 29256c4..a23ff96 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -246,6 +246,8 @@
]
}
+ include_dirs = [ "${target_gen_dir}/include" ]
+
deps = [ ":glslang_build_info" ]
if (invoker.enable_opt) {
@@ -253,10 +255,9 @@
"${spirv_tools_dir}:spvtools_opt",
"${spirv_tools_dir}:spvtools_val",
]
+ include_dirs += [ "${spirv_tools_dir}/include" ]
}
- include_dirs = [ "${target_gen_dir}/include" ]
-
configs -= _configs_to_remove
configs += _configs_to_add
}
@@ -302,7 +303,10 @@
]
public_configs = [ ":glslang_hlsl" ]
- include_dirs = [ "${target_gen_dir}/include" ]
+ include_dirs = [
+ "${target_gen_dir}/include",
+ "${spirv_tools_dir}/include",
+ ]
configs -= _configs_to_remove
configs += _configs_to_add
@@ -313,6 +317,8 @@
defines = [ "ENABLE_OPT=1" ]
deps = [ ":glslang_sources" ]
+ include_dirs += [ "${spirv_tools_dir}/include" ]
+
configs -= _configs_to_remove
configs += _configs_to_add
}