Lines Matching refs:ctx
40 def _gbl_clang_cc_toolchain_config_impl(ctx):
42 builtin_includes = ctx.attr.builtin_includes or [LLVM_PREBUILTS_C_INCLUDE]
45 "--target={}".format(ctx.attr.target_system_triple),
50 ] + ["-I{}".format(inc) for inc in builtin_includes] + ctx.attr.cc_flags),
53 ctx = ctx,
55 toolchain_identifier = "{}_id".format(ctx.attr.cc_toolchain_name),
57 target_system_name = ctx.attr.target_system_triple,
58 target_cpu = ctx.attr.target_cpu,
84 flag_sets = [_flag_set(ctx.attr.ld_flags)] if ctx.attr.ld_flags else [],
181 def _prebuilt_binary_impl(ctx):
187 out = ctx.actions.declare_file(ctx.label.name)
188 ctx.actions.symlink(
190 target_file = ctx.executable.bin,
214 def _forward_and_symlink(ctx):
216 for file in ctx.files.deps:
220 out = ctx.actions.declare_file("{}_{}.{}".format(stem, ctx.label.name, file.extension))
221 ctx.actions.symlink(output = out, target_file = file)
268 def _link_static_cc_library_impl(ctx):
271 libname = "_{}".format(ctx.label.name)
274 out_msvc_style = ctx.actions.declare_file("{}.lib".format(libname))
275 ctx.actions.symlink(output = out_msvc_style, target_file = ctx.files.cc_library[0])
276 out_linux_style = ctx.actions.declare_file("lib{}.a".format(libname))
277 ctx.actions.symlink(output = out_linux_style, target_file = ctx.files.cc_library[0])
282 actions = ctx.actions,
287 owner = ctx.label,