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 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 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"); }