blob: 39b3100ae7c76da9b3ab519013592a1757c2b4de [file] [log] [blame]
/*
* Copyright (C) 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package {
// See: http://go/android-license-faq
default_applicable_licenses: ["external_mesa3d_license"],
}
cc_library_headers {
name: "mesa_compiler_headers",
vendor: true,
host_supported: true,
export_include_dirs: [
".",
],
}
filegroup {
name: "mesa_float64_glsl",
srcs: ["glsl/float64.glsl"],
}
python_binary_host {
name: "ir_expression_operation_gen",
main: "glsl/ir_expression_operation.py",
srcs: [
"glsl/ir_expression_operation.py",
],
libs: [
"mako",
],
}
genrule {
name: "ir_expression_operation_header",
out: ["ir_expression_operation.h"],
tools: ["ir_expression_operation_gen"],
cmd: "python3 $(location ir_expression_operation_gen) enum" +
"&> $(location ir_expression_operation.h)",
}
python_binary_host {
name: "builtin_types_header_gen",
main: "builtin_types_h.py",
srcs: [
"builtin_types_h.py",
"builtin_types.py",
],
libs: [
"mako",
],
version: {
py3: {
embedded_launcher: false,
},
},
}
python_binary_host {
name: "builtin_types_impl_gen",
main: "builtin_types_c.py",
srcs: [
"builtin_types_c.py",
"builtin_types.py",
],
libs: [
"mako",
],
version: {
py3: {
embedded_launcher: false,
},
},
}
genrule {
name: "builtin_types_header",
out: ["builtin_types.h"],
tools: ["builtin_types_header_gen"],
cmd: "python3 $(location builtin_types_header_gen) " +
"$(location builtin_types.h)",
}
genrule {
name: "builtin_types_impl",
out: ["builtin_types.c"],
tools: ["builtin_types_impl_gen"],
cmd: "python3 $(location builtin_types_impl_gen) " +
"$(location builtin_types.c)",
}
cc_library_static {
name: "mesa_compiler",
vendor: true,
host_supported: true,
defaults: [
"mesa_common_defaults",
],
static_libs: [
"mesa_util_c11",
],
generated_headers: [
"ir_expression_operation_header",
"builtin_types_header",
"u_format_gen_header",
],
generated_sources: [
"builtin_types_impl",
],
header_libs: [
"mesa_gallium_auxiliary_headers",
"mesa_gallium_headers",
"mesa_src_headers",
"mesa_compiler_headers",
"mesa_common_headers",
],
srcs: [
"glsl_types.c",
"shader_enums.c",
],
}