summaryrefslogtreecommitdiff
path: root/build_defs.bzl
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2019-04-23 23:06:58 +0000
committerJoshua Haberman <jhaberman@gmail.com>2019-04-23 23:06:58 +0000
commit65f97218d1c9d6896a2bc484f72db8077bcc0219 (patch)
treeaa6bbd96c085960fb558ca0946a87a3bedcb1fe0 /build_defs.bzl
parent9fa3e8bd62ecc6692847a389b80c11efbe86eb57 (diff)
Removed some obsolete code.
Diffstat (limited to 'build_defs.bzl')
-rw-r--r--build_defs.bzl21
1 files changed, 6 insertions, 15 deletions
diff --git a/build_defs.bzl b/build_defs.bzl
index d39db4d..6e52189 100644
--- a/build_defs.bzl
+++ b/build_defs.bzl
@@ -302,26 +302,20 @@ def _generate_output_file(ctx, src, extension):
real_short_path = _get_real_short_path(src)
output_filename = paths.replace_extension(real_short_path, extension)
ret = ctx.new_file(ctx.genfiles_dir, output_filename)
- real_genfiles_dir = ret.path[:-len(output_filename)]
- return ret, real_genfiles_dir
+ return ret
def _generate_output_files(ctx, package, file_names, file_types):
result = {}
- real_genfiles_dir = None
for key in file_types.keys():
- arr = []
- for name in file_names:
- file, real_genfiles_dir = _generate_output_file(ctx, name, file_types[key])
- arr.append(file)
- result[key] = arr
- return result, real_genfiles_dir
+ result[key] = [_generate_output_file(ctx, name, file_types[key]) for name in file_names]
+ return result
def cc_library_func(ctx, hdrs, srcs, deps):
compilation_contexts = []
- cc_infos = []
+ linking_contexts = []
for dep in deps:
if CcInfo in dep:
- cc_infos.append(dep[CcInfo])
+ linking_contexts.append(dep[CcInfo].linking_context)
compilation_contexts.append(dep[CcInfo].compilation_context)
toolchain = find_cpp_toolchain(ctx)
feature_configuration = cc_common.configure_features(
@@ -337,9 +331,6 @@ def cc_library_func(ctx, hdrs, srcs, deps):
hdrs = hdrs,
compilation_contexts = compilation_contexts,
)
- # create link action
- linking_contexts = [provider.linking_context for provider in cc_infos]
-
linking_info = cc_common.link(
ctx = ctx,
feature_configuration = feature_configuration,
@@ -359,7 +350,7 @@ def _upb_proto_library_aspect_impl(target, ctx):
"srcs": ".upb.c",
"hdrs": ".upb.h",
}
- files, real_genfiles_dir = _generate_output_files(
+ files = _generate_output_files(
ctx = ctx,
package = ctx.label.package,
file_names = proto_sources,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback