Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 6996.bzl #8488

Merged
merged 2 commits into from
Mar 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions solvers/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ drake_cc_library(
hdrs = ["unrevised_lemke_solver.h"],
deps = [
":mathematical_program_api",
"//drake/common:essential",
"//common:essential",
],
)

Expand Down Expand Up @@ -956,7 +956,7 @@ drake_cc_googletest(
deps = [
":mathematical_program",
":unrevised_lemke_solver",
"//drake/common/test_utilities:eigen_matrix_compare",
"//common/test_utilities:eigen_matrix_compare",
],
)

Expand Down
4 changes: 2 additions & 2 deletions systems/analysis/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ drake_cc_library(
],
deps = [
":initial_value_problem",
"//drake/common:essential",
"//drake/common:unused",
"//common:essential",
"//common:unused",
],
)

Expand Down
31 changes: 0 additions & 31 deletions tools/skylark/6996.bzl

This file was deleted.

24 changes: 4 additions & 20 deletions tools/skylark/drake_cc.bzl
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# -*- python -*-

load(
"//tools/skylark:6996.bzl",
"adjust_label_for_drake_hoist",
"adjust_labels_for_drake_hoist",
)

# Keep CXX_FLAGS, CLANG_FLAGS, and GCC_FLAGS in sync with CMAKE_CXX_FLAGS in
# matlab/cmake/flags.cmake.

Expand Down Expand Up @@ -127,7 +121,7 @@ def installed_headers_for_dep(dep):
last_slash = dep.rindex("/")
libname = dep[last_slash + 1:]
result = dep + ":" + libname + suffix
return adjust_label_for_drake_hoist(result)
return result

def installed_headers_for_drake_deps(deps):
"""Filters `deps` to find drake labels (i.e., discard third_party labels),
Expand Down Expand Up @@ -229,7 +223,6 @@ def _raw_drake_cc_library(
name,
hdrs = [],
srcs = [], # Cannot list any headers here.
data = [],
deps = [],
declare_installed_headers = 0,
install_hdrs_exclude = [],
Expand All @@ -239,8 +232,6 @@ def _raw_drake_cc_library(
a drake_installed_headers() target. (This should be set if and only if the
caller is drake_cc_library.)
"""
data = adjust_labels_for_drake_hoist(data)
deps = adjust_labels_for_drake_hoist(deps)
_check_library_deps_blacklist(name, deps)
_, private_hdrs = _prune_private_hdrs(srcs)
if private_hdrs:
Expand All @@ -257,7 +248,6 @@ def _raw_drake_cc_library(
hdrs = hdrs,
srcs = srcs,
deps = deps,
data = data,
strip_include_prefix = strip_include_prefix,
include_prefix = include_prefix,
**kwargs)
Expand Down Expand Up @@ -377,8 +367,6 @@ def drake_cc_binary(
tests. The smoke-test will be named <name>_test. You may override cc_test
defaults using test_rule_args=["-f", "--bar=42"] or test_rule_size="baz".
"""
data = adjust_labels_for_drake_hoist(data)
deps = adjust_labels_for_drake_hoist(deps)
new_copts = _platform_copts(copts, gcc_copts)
new_srcs, new_deps = _maybe_add_pruned_private_hdrs_dep(
base_name = name,
Expand Down Expand Up @@ -450,7 +438,6 @@ def drake_cc_test(
name,
size = None,
srcs = [],
data = [],
deps = [],
copts = [],
gcc_copts = [],
Expand All @@ -467,8 +454,6 @@ def drake_cc_test(
in debug-mode builds, so the test will trivially pass. This option should
be used only rarely, and the reason should always be documented.
"""
data = adjust_labels_for_drake_hoist(data)
deps = adjust_labels_for_drake_hoist(deps)
if size == None:
size = "small"
if not srcs:
Expand All @@ -492,7 +477,6 @@ def drake_cc_test(
name = name,
size = size,
srcs = new_srcs,
data = data,
deps = new_deps,
copts = new_copts,
**kwargs)
Expand Down Expand Up @@ -526,9 +510,9 @@ def drake_cc_googletest(
be used only rarely, and the reason should always be documented.
"""
if use_default_main:
deps = deps + adjust_labels_for_drake_hoist([
"//drake/common/test_utilities:drake_cc_googletest_main",
])
deps = deps + [
"//common/test_utilities:drake_cc_googletest_main",
]
else:
deps = deps + ["@gtest//:without_main"]
drake_cc_test(
Expand Down
4 changes: 0 additions & 4 deletions tools/skylark/drake_java.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- python -*-

load("//tools/skylark:6996.bzl", "adjust_labels_for_drake_hoist")

MainClassInfo = provider()

# Generate a launcher file to run installed java binaries
Expand Down Expand Up @@ -35,7 +33,6 @@ _drake_java_binary_install_launcher = rule(
def drake_java_binary(
name,
main_class,
runtime_deps = [],
**kwargs):
"""Creates a rule to declare a java binary and a MainClassInfo Provider

Expand All @@ -55,7 +52,6 @@ def drake_java_binary(
native.java_binary(
name = name,
main_class = main_class,
runtime_deps = adjust_labels_for_drake_hoist(runtime_deps),
**kwargs)
launcher_name = name + "-launcher"
_drake_java_binary_install_launcher(
Expand Down
2 changes: 0 additions & 2 deletions tools/skylark/drake_proto.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_library",
)
load("//tools/skylark:6996.bzl", "adjust_labels_for_drake_hoist")

def drake_cc_proto_library(
name,
Expand All @@ -18,7 +17,6 @@ def drake_cc_proto_library(
tags = [],
**kwargs):
"""A wrapper to insert Drake-specific customizations."""
deps = adjust_labels_for_drake_hoist(deps)
pb_hdrs = [x[:-len(".proto")] + ".pb.h" for x in srcs]
pb_srcs = [x[:-len(".proto")] + ".pb.cc" for x in srcs]
# Generate the h and cc file.
Expand Down
18 changes: 2 additions & 16 deletions tools/skylark/drake_py.bzl
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# -*- python -*-

load("//tools/skylark:6996.bzl", "adjust_labels_for_drake_hoist")

def drake_py_library(
name,
deps = None,
data = None,
**kwargs):
"""A wrapper to insert Drake-specific customizations."""
deps = adjust_labels_for_drake_hoist(deps)
data = adjust_labels_for_drake_hoist(data)
# Work around https://github.com/bazelbuild/bazel/issues/1567.
deps = (deps or []) + ["//:module_py"]
native.py_library(
name = name,
deps = deps,
data = data,
**kwargs)

def _py_target_isolated(
Expand Down Expand Up @@ -64,7 +58,6 @@ def drake_py_binary(
name,
srcs = None,
deps = None,
data = None,
isolate = False,
**kwargs):
"""A wrapper to insert Drake-specific customizations.
Expand All @@ -74,8 +67,6 @@ def drake_py_binary(
library code. This prevents submodules from leaking in as top-level
submodules. For more detail, see #8041.
"""
deps = adjust_labels_for_drake_hoist(deps)
data = adjust_labels_for_drake_hoist(data)
# Work around https://github.com/bazelbuild/bazel/issues/1567.
deps = (deps or []) + ["//:module_py"]
_py_target_isolated(
Expand All @@ -84,7 +75,6 @@ def drake_py_binary(
isolate = isolate,
srcs = srcs,
deps = deps,
data = data,
**kwargs)

def drake_py_unittest(
Expand All @@ -111,7 +101,6 @@ def drake_py_test(
name,
srcs = None,
deps = None,
data = None,
isolate = True,
allow_import_unittest = False,
**kwargs):
Expand All @@ -132,19 +121,16 @@ def drake_py_test(
"""
if srcs == None:
srcs = ["test/%s.py" % name]
deps = adjust_labels_for_drake_hoist(deps)
if not allow_import_unittest:
deps = deps + ["//common/test_utilities:disable_python_unittest"]
data = adjust_labels_for_drake_hoist(data)
# Work around https://github.com/bazelbuild/bazel/issues/1567.
deps = (deps or []) + ["//:module_py"]
if not allow_import_unittest:
deps = deps + ["//common/test_utilities:disable_python_unittest"]
_py_target_isolated(
name = name,
py_target = native.py_test,
isolate = isolate,
srcs = srcs,
deps = deps,
data = data,
**kwargs)

def py_test_isolated(
Expand Down
1 change: 0 additions & 1 deletion tools/skylark/pybind.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ load(
"drake_py_library",
"drake_py_test",
)
load("//tools/skylark:6996.bzl", "adjust_label_for_drake_hoist")

_PY_VERSION = "2.7"

Expand Down