remove support for *.rc files
We're now packaging llvm-windres (aosp/1870074) which can be used as a
substitute for GNU binutils' windres, but we've also removed the last
consumer of .rc files in aosp/1867048 (external/mdnsresponder/).
In the worst case, we can bring back support for .rc files but instead
process them with llvm-windres.
Bug: 203794880
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Change-Id: I30a873537e004b46a87191a932d076a89463c873
diff --git a/cc/builder.go b/cc/builder.go
index b494f7b..082a70c 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -238,14 +238,6 @@
},
"asFlags")
- // Rule to invoke windres, for interaction with Windows resources.
- windres = pctx.AndroidStaticRule("windres",
- blueprint.RuleParams{
- Command: "$windresCmd $flags -I$$(dirname $in) -i $in -o $out --preprocessor \"${config.ClangBin}/clang -E -xc-header -DRC_INVOKED\"",
- CommandDeps: []string{"$windresCmd"},
- },
- "windresCmd", "flags")
-
_ = pctx.SourcePathVariable("sAbiDumper", "prebuilts/clang-tools/${config.HostPrebuiltTag}/bin/header-abi-dumper")
// -w has been added since header-abi-dumper does not need to produce any sort of diagnostic information.
@@ -577,20 +569,6 @@
},
})
continue
- case ".rc":
- ctx.Build(pctx, android.BuildParams{
- Rule: windres,
- Description: "windres " + srcFile.Rel(),
- Output: objFile,
- Input: srcFile,
- Implicits: cFlagsDeps,
- OrderOnly: pathDeps,
- Args: map[string]string{
- "windresCmd": mingwCmd(flags.toolchain, "windres"),
- "flags": shareFlags("flags", flags.toolchain.WindresFlags()),
- },
- })
- continue
case ".o":
objFiles[i] = srcFile
continue
diff --git a/cc/config/toolchain.go b/cc/config/toolchain.go
index 20384a8..6320dbb 100644
--- a/cc/config/toolchain.go
+++ b/cc/config/toolchain.go
@@ -95,8 +95,6 @@
YasmFlags() string
- WindresFlags() string
-
Is64Bit() bool
ShlibSuffix() string
@@ -169,10 +167,6 @@
return ""
}
-func (toolchainBase) WindresFlags() string {
- return ""
-}
-
func (toolchainBase) LibclangRuntimeLibraryArch() string {
return ""
}
diff --git a/cc/config/x86_windows_host.go b/cc/config/x86_windows_host.go
index d9a7537..9daf40f 100644
--- a/cc/config/x86_windows_host.go
+++ b/cc/config/x86_windows_host.go
@@ -188,14 +188,6 @@
return "${config.WindowsIncludeFlags}"
}
-func (t *toolchainWindowsX86) WindresFlags() string {
- return "-F pe-i386"
-}
-
-func (t *toolchainWindowsX8664) WindresFlags() string {
- return "-F pe-x86-64"
-}
-
func (t *toolchainWindowsX86) ClangTriple() string {
return "i686-windows-gnu"
}