Skip to content

Commit

Permalink
Back out "[aarch64][tools/build_defs/third_party/fbcode_defs.bzl] Fix…
Browse files Browse the repository at this point in the history
… dep handling in cross-builds"

Differential Revision: D45415678nnPull Request resolved: pytorch#100294
  • Loading branch information
donaldong authored May 1, 2023
1 parent c3ccdc0 commit a1d0417
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
12 changes: 2 additions & 10 deletions buckbuild.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -566,21 +566,13 @@ def pt_operator_query_codegen(
apple_sdks = None):
oplist_dir_name = name + "_pt_oplist"

# Use a helper rule to properly resolves any `select()`s in deps.
fb_native.cxx_library(
name = oplist_dir_name + "-deps",
compatible_with = compatible_with,
deps = deps,
visibility = ["PUBLIC"],
)

# @lint-ignore BUCKLINT
fb_native.genrule(
name = oplist_dir_name,
cmd = ("$(exe {}tools:gen_oplist) ".format(ROOT_PATH) +
"--model_file_list_path $(@query_outputs 'attrfilter(labels, pt_operator_library, deps(\":{name}-deps\"))') " +
"--model_file_list_path $(@query_outputs 'attrfilter(labels, pt_operator_library, deps(set({deps})))') " +
("" if enforce_traced_op_list else "--allow_include_all_overloads ") +
"--output_dir $OUT ").format(name = oplist_dir_name),
"--output_dir $OUT ").format(deps = " ".join(["\"{}\"".format(d) for d in deps])),
outs = get_gen_oplist_outs(),
default_outs = ["."],
compatible_with = compatible_with,
Expand Down
4 changes: 0 additions & 4 deletions tools/build_defs/fb_native_wrapper.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ def _read_config(**kwargs):
def _filegroup(**kwargs):
filegroup(**kwargs)

def _cxx_library(**kwargs):
cxx_library(**kwargs)

fb_native = struct(
cxx_library = _cxx_library,
genrule = _genrule,
read_config = _read_config,
filegroup = _filegroup,
Expand Down

0 comments on commit a1d0417

Please sign in to comment.