Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18985>
* extension if NULL.
*/
const char * const *allowed_spirv_extensions;
+
+ unsigned address_bits;
};
struct clc_binary {
&c->getDiagnosticOpts())
};
+ const char *triple = args->address_bits == 32 ? "spir-unknown-unknown" : "spir64-unknown-unknown";
+
std::vector<const char *> clang_opts = {
args->source.name,
- "-triple", "spir64-unknown-unknown",
+ "-triple", triple,
// By default, clang prefers to use modules to pull in the default headers,
// which doesn't work with our technique of embedding the headers in our binary
#if LLVM_VERSION_MAJOR >= 15
spirv_version: clc_spirv_version::CLC_SPIRV_VERSION_MAX,
features: features,
allowed_spirv_extensions: ptr::null(),
+ address_bits: 64,
};
let mut msgs: Vec<String> = Vec::new();
let logger = clc_logger {