File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ func getExtraFlags(t Target) string {
7272 return strings .Join (flags , " " )
7373}
7474
75+ func envFlagEnabled (name string ) bool {
76+ value := strings .TrimSpace (strings .ToLower (os .Getenv (name )))
77+ return value != "" && value != "0" && value != "false" && value != "no"
78+ }
79+
7580type openwrtConfig struct {
7681 target string // OpenWrt target (e.g., "x86", "armsr")
7782 subtarget string // OpenWrt subtarget (e.g., "64", "generic")
@@ -279,9 +284,11 @@ func buildTarget(t Target) {
279284 }
280285
281286 if runtime .GOOS == "windows" {
282- sccachePath , _ := exec .LookPath ("sccache" )
283- if sccachePath != "" {
284- args = append (args , fmt .Sprintf (`cc_wrapper="%s"` , sccachePath ))
287+ if ! envFlagEnabled ("SCCACHE_DISABLE" ) {
288+ sccachePath , _ := exec .LookPath ("sccache" )
289+ if sccachePath != "" {
290+ args = append (args , fmt .Sprintf (`cc_wrapper="%s"` , sccachePath ))
291+ }
285292 }
286293 } else {
287294 ccachePath , _ := exec .LookPath ("ccache" )
You can’t perform that action at this time.
0 commit comments