Skip to content

Commit f5618c7

Browse files
SS-JIAfacebook-github-bot
authored andcommitted
Introduce static targets
Summary: As title. Differential Revision: D66111871
1 parent 5b4d9bb commit f5618c7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

backends/vulkan/targets.bzl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def vulkan_spv_shader_lib(name, spv_filegroups, is_fbcode = False, no_volk = Fal
6666
compiler_flags = get_vulkan_compiler_flags(),
6767
labels = get_labels(no_volk),
6868
platforms = get_platforms(no_volk),
69-
define_static_target = False,
69+
define_static_target = True,
7070
# Static initialization is used to register shaders to the global shader registry,
7171
# therefore link_whole must be True to make sure unused symbols are not discarded.
7272
# @lint-ignore BUCKLINT: Avoid `link_whole=True`
@@ -197,7 +197,7 @@ def define_common_targets(is_fbcode = False):
197197
exported_deps = [
198198
":vulkan_graph_runtime_shaderlib{}".format(suffix),
199199
],
200-
define_static_target = False,
200+
define_static_target = True,
201201
# Static initialization is used to register operators to the global operator registry,
202202
# therefore link_whole must be True to make sure unused symbols are not discarded.
203203
# @lint-ignore BUCKLINT: Avoid `link_whole=True`
@@ -215,7 +215,6 @@ def define_common_targets(is_fbcode = False):
215215
no_volk = no_volk,
216216
)
217217

218-
219218
runtime.cxx_library(
220219
name = "vulkan_backend_lib{}".format(suffix),
221220
srcs = native.glob([
@@ -240,7 +239,7 @@ def define_common_targets(is_fbcode = False):
240239
"//executorch/runtime/backend:interface",
241240
"//executorch/runtime/core/exec_aten/util:tensor_util",
242241
],
243-
define_static_target = False,
242+
define_static_target = True,
244243
# VulkanBackend.cpp needs to compile with executor as whole
245244
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
246245
link_whole = True,

0 commit comments

Comments
 (0)