@@ -593,6 +593,7 @@ filegroup(
593
593
"//tensorflow/core/kernels:android_srcs" ,
594
594
"//tensorflow/core/util/ctc:android_srcs" ,
595
595
"common_runtime/gpu/gpu_tracer.cc" ,
596
+ "common_runtime/gpu/gpu_tracer.h" ,
596
597
] + glob (
597
598
[
598
599
"client/**/*.cc" ,
@@ -604,8 +605,6 @@ filegroup(
604
605
"graph/**/*.cc" ,
605
606
"lib/**/*.h" ,
606
607
"lib/**/*.cc" ,
607
- "platform/*.h" ,
608
- "platform/*.cc" ,
609
608
"platform/**/*.h" ,
610
609
"platform/**/*.cc" ,
611
610
"public/**/*.h" ,
@@ -617,52 +616,22 @@ filegroup(
617
616
"**/*testutil*" ,
618
617
"**/*testlib*" ,
619
618
"**/*main.cc" ,
620
- "lib/jpeg/*.h" ,
621
- "lib/jpeg/*.cc" ,
622
- "lib/png/*.h" ,
623
- "lib/png/*.cc" ,
624
- "util/events_writer.cc" ,
625
- "util/events_writer.h" ,
626
- # Exclude all protobuf/google headers except protobuf_android.h
619
+ "lib/jpeg/**/*" ,
620
+ "lib/png/**/*" ,
621
+ "util/events_writer.*" ,
622
+ "platform/default/stream_executor.*" ,
627
623
"platform/cuda.h" ,
628
- "platform/default/stream_executor.h" ,
629
- "platform/google/cord_coding.h" ,
630
- "platform/google/dynamic_annotations.h" ,
631
- "platform/google/integral_types.h" ,
632
- "platform/google/mutex.h" ,
633
- "platform/google/protobuf.h" ,
634
- "platform/google/stream_executor.h" ,
635
- "platform/google/tracing_impl.h" ,
636
- "platform/google/*.cc" ,
637
- "platform/google/test_benchmark.cc" ,
638
- "platform/google/test_benchmark.h" ,
639
- "platform/jpeg.h" ,
640
- "platform/stream_executor.h" ,
624
+ "platform/google/**/*" ,
625
+ "platform/jpeg.*" ,
626
+ "platform/stream_executor.*" ,
641
627
"user_ops/**/*.cu.cc" ,
642
- "common_runtime/gpu/*.cc" ,
643
- "common_runtime/gpu/pool_allocator.h" ,
644
- "common_runtime/gpu/gpu_bfc_allocator.h" ,
645
- "common_runtime/gpu/gpu_debug_allocator.h" ,
646
- "common_runtime/gpu/gpu_device.h" ,
647
- "common_runtime/gpu/gpu_util.h" ,
648
- "common_runtime/gpu/gpu_event_mgr.h" ,
649
- "common_runtime/gpu_device_factory.cc" ,
628
+ "common_runtime/gpu/**/*" ,
629
+ "common_runtime/gpu_device_factory.*" ,
650
630
],
651
631
),
652
632
visibility = ["//visibility:public" ],
653
633
)
654
634
655
- ANDROID_TF_LITE_HDRS = [
656
- "framework/tensor.h" ,
657
- "platform/default/integral_types.h" ,
658
- "platform/env.h" ,
659
- "platform/file_system.h" ,
660
- "platform/logging.h" ,
661
- "platform/platform.h" ,
662
- "platform/types.h" ,
663
- "public/session.h" ,
664
- ] + proto_text_hdrs_and_srcs .hdrs
665
-
666
635
# Native library support for Android applications.
667
636
# Does not contain operators, use :android_tensorflow_lib if you want full
668
637
# operator support.
@@ -674,6 +643,9 @@ ANDROID_TF_LITE_HDRS = [
674
643
# --crosstool_top=//external:android/crosstool \
675
644
# --cpu=armeabi-v7a \
676
645
# --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
646
+ #
647
+ # Layering checks are explicitly disabled since hdrs are not used to
648
+ # verify Android builds, which leads to incorrect and misleading header lists.
677
649
cc_library (
678
650
name = "android_tensorflow_lib_lite" ,
679
651
srcs =
@@ -683,8 +655,8 @@ cc_library(
683
655
],
684
656
"//conditions:default" : [],
685
657
}),
686
- hdrs = ANDROID_TF_LITE_HDRS ,
687
658
copts = tf_copts () + ["-Os" ],
659
+ features = ["-layering_check" ],
688
660
tags = [
689
661
"manual" ,
690
662
"notap" ,
@@ -709,6 +681,7 @@ cc_library(
709
681
"//conditions:default" : [],
710
682
}),
711
683
copts = tf_copts (),
684
+ features = ["-layering_check" ],
712
685
tags = [
713
686
"manual" ,
714
687
"notap" ,
0 commit comments