forked from homuler/MediaPipeUnityPlugin
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbazel_android_fixes.diff
More file actions
76 lines (73 loc) · 3.29 KB
/
Copy pathbazel_android_fixes.diff
File metadata and controls
76 lines (73 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt
index 6e6c5c9592..e201f38565 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_cc_toolchain_template.txt
@@ -14,7 +14,7 @@ cc_toolchain(
objcopy_files = ":%toolchainName%-all_files",
static_runtime_lib = ":%staticRuntimeLibs%",
strip_files = ":%toolchainName%-all_files",
- supports_param_files = 0,
+ supports_param_files = 1,
toolchain_identifier = "%toolchainName%",
toolchain_config = ":%toolchainName%-config",
)
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java
index 5140b4afdd..3c207997ef 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppFileTypes.java
@@ -31,7 +31,7 @@ public final class CppFileTypes {
// supported with clang. Bazel is not officially supporting these targets, and the extensions are
// listed only as long as they work with the existing C++ actions.
public static final FileType CPP_SOURCE =
- FileType.of(".cc", ".cpp", ".cxx", ".c++", ".C", ".cu", ".cl");
+ FileType.of(".cc", ".cpp", ".cxx", ".c++", ".cu", ".cl");
public static final FileType C_SOURCE = FileType.of(".c");
public static final FileType OBJC_SOURCE = FileType.of(".m");
public static final FileType OBJCPP_SOURCE = FileType.of(".mm");
@@ -91,15 +91,46 @@ public final class CppFileTypes {
}
};
- public static final FileType ASSEMBLER_WITH_C_PREPROCESSOR = FileType.of(".S");
- public static final FileType PIC_ASSEMBLER = FileType.of(".pic.s");
+ // FileType is extended to use case-sensitive comparison also on Windows
+ public static final FileType ASSEMBLER_WITH_C_PREPROCESSOR =
+ new FileType() {
+ final String ext = ".S";
+
+ @Override
+ public boolean apply(String path) {
+ return path.endsWith(ext);
+ }
+
+ @Override
+ public ImmutableList<String> getExtensions() {
+ return ImmutableList.of(ext);
+ }
+ };
+
+ // FileType is extended to use case-sensitive comparison also on Windows
+ public static final FileType PIC_ASSEMBLER =
+ new FileType() {
+ final String ext = ".pic.s";
+
+ @Override
+ public boolean apply(String path) {
+ return OS.endsWith(path, ext) && path.endsWith(".s");
+ }
+
+ @Override
+ public ImmutableList<String> getExtensions() {
+ return ImmutableList.of(ext);
+ }
+ };
+
+ // FileType is extended to use case-sensitive comparison also on Windows
public static final FileType ASSEMBLER =
new FileType() {
final String ext = ".s";
@Override
public boolean apply(String path) {
- return (OS.endsWith(path, ext) && !PIC_ASSEMBLER.matches(path))
+ return (path.endsWith(ext) && !PIC_ASSEMBLER.matches(path))
|| OS.endsWith(path, ".asm");
}