mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
add ccache support for custom toolchain (#180737)
Add ccache support when building the engine using a custom toolchain. Fixes #180736 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above.
This commit is contained in:
parent
f94d0cb3b2
commit
ae0fe0d05c
@ -3,15 +3,20 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/toolchain/custom/custom.gni")
|
||||
import("//build/toolchain/ccache.gni")
|
||||
|
||||
toolchain("custom") {
|
||||
toolchain_bin = "${custom_toolchain}/bin"
|
||||
compiler_prefix = ""
|
||||
if (use_ccache) {
|
||||
compiler_prefix = "ccache "
|
||||
}
|
||||
|
||||
# We can't do string interpolation ($ in strings) on things with dots in
|
||||
# them. To allow us to use $cc below, for example, we create copies of
|
||||
# these values in our scope.
|
||||
cc = "${toolchain_bin}/clang"
|
||||
cxx = "${toolchain_bin}/clang++"
|
||||
cc = "${compiler_prefix}${toolchain_bin}/clang"
|
||||
cxx = "${compiler_prefix}${toolchain_bin}/clang++"
|
||||
ar = "${toolchain_bin}/${custom_target_triple}-ar"
|
||||
ld = "${toolchain_bin}/clang++"
|
||||
readelf = "${toolchain_bin}/${custom_target_triple}-readelf"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user