mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-04-10 03:20:12 +03:00
build: Use ccache binary instead of PATH
The ccache symlinks dir may differ (Arch and Debian disagree, for example), and this allows us to use ccache for mingw-w64 within the runtime container.
This commit is contained in:
parent
24b944292e
commit
9d7713235c
6
Vagrantfile
vendored
6
Vagrantfile
vendored
@ -106,12 +106,6 @@ Vagrant.configure(2) do |config|
|
|||||||
|
|
||||||
#ensure we use only the mingw-w64 that we built
|
#ensure we use only the mingw-w64 that we built
|
||||||
apt-get remove -y '*mingw-w64*'
|
apt-get remove -y '*mingw-w64*'
|
||||||
|
|
||||||
#setup ccache
|
|
||||||
ln -s $(which ccache) /usr/lib/ccache/x86_64-w64-mingw32-gcc
|
|
||||||
ln -s $(which ccache) /usr/lib/ccache/x86_64-w64-mingw32-g++
|
|
||||||
ln -s $(which ccache) /usr/lib/ccache/i686-w64-mingw32-gcc
|
|
||||||
ln -s $(which ccache) /usr/lib/ccache/i686-w64-mingw32-g++
|
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -37,11 +37,26 @@ ifeq ($(SRCDIR),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# If CC is coming from make's defaults or nowhere, use our own default. Otherwise respect environment.
|
# If CC is coming from make's defaults or nowhere, use our own default. Otherwise respect environment.
|
||||||
|
ifeq ($(ENABLE_CCACHE),1)
|
||||||
|
CCACHE_BIN := ccache
|
||||||
|
else
|
||||||
|
export CCACHE_DISABLE = 1
|
||||||
|
DOCKER_CCACHE_FLAG = -e CCACHE_DISABLE=1
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(filter default undefined,$(origin CC)),)
|
ifneq ($(filter default undefined,$(origin CC)),)
|
||||||
CC = gcc
|
CC = $(CCACHE_BIN) gcc
|
||||||
endif
|
endif
|
||||||
ifneq ($(filter default undefined,$(origin CXX)),)
|
ifneq ($(filter default undefined,$(origin CXX)),)
|
||||||
CXX = g++
|
CXX = $(CCACHE_BIN) g++
|
||||||
|
endif
|
||||||
|
ifneq ($(filter default undefined,$(origin CROSSCC)),)
|
||||||
|
CROSSCC32 = $(CCACHE_BIN) i686-w64-mingw32-gcc
|
||||||
|
CROSSCC64 = $(CCACHE_BIN) x86_64-w64-mingw32-gcc
|
||||||
|
endif
|
||||||
|
ifneq ($(filter default undefined,$(origin CROSSCXX)),)
|
||||||
|
CROSSCXX32 = $(CCACHE_BIN) i686-w64-mingw32-g++
|
||||||
|
CROSSCXX64 = $(CCACHE_BIN) x86_64-w64-mingw32-g++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export CC
|
export CC
|
||||||
@ -50,8 +65,6 @@ export CXX
|
|||||||
ifeq ($(ENABLE_CCACHE),1)
|
ifeq ($(ENABLE_CCACHE),1)
|
||||||
export PATH := /usr/lib/ccache:$(PATH)
|
export PATH := /usr/lib/ccache:$(PATH)
|
||||||
else
|
else
|
||||||
export CCACHE_DISABLE = 1
|
|
||||||
DOCKER_CCACHE_FLAG = -e CCACHE_DISABLE=1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC32 := gcc -m32 -mstackrealign
|
CC32 := gcc -m32 -mstackrealign
|
||||||
@ -179,6 +192,8 @@ QUOTE_VARIABLE_LIST = $(foreach a,$(1),$(call QUOTE_VARIABLE,$(a)))
|
|||||||
STRIP_QUOTED = $(call QUOTE,$(STRIP))
|
STRIP_QUOTED = $(call QUOTE,$(STRIP))
|
||||||
CC_QUOTED = $(call QUOTE,$(CC))
|
CC_QUOTED = $(call QUOTE,$(CC))
|
||||||
CXX_QUOTED = $(call QUOTE,$(CXX))
|
CXX_QUOTED = $(call QUOTE,$(CXX))
|
||||||
|
CROSSCC32_QUOTED = $(call QUOTE,$(CROSSCC32))
|
||||||
|
CROSSCC64_QUOTED = $(call QUOTE,$(CROSSCC64))
|
||||||
|
|
||||||
##
|
##
|
||||||
## Target configs
|
## Target configs
|
||||||
@ -1071,7 +1086,7 @@ $(WINE_CONFIGURE_FILES64): $(MAKEFILE_DEP) | faudio64 gst_base64 $(WINE_OBJ64)
|
|||||||
LDFLAGS=-L$(abspath $(TOOLS_DIR64))/lib \
|
LDFLAGS=-L$(abspath $(TOOLS_DIR64))/lib \
|
||||||
PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \
|
PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \
|
||||||
CC=$(CC_QUOTED) \
|
CC=$(CC_QUOTED) \
|
||||||
CXX=$(CXX_QUOTED) \
|
CROSSCC=$(CROSSCC64_QUOTED) \
|
||||||
CROSSDEBUG=split-dwarf
|
CROSSDEBUG=split-dwarf
|
||||||
|
|
||||||
# 32-bit configure
|
# 32-bit configure
|
||||||
@ -1089,7 +1104,7 @@ $(WINE_CONFIGURE_FILES32): $(MAKEFILE_DEP) | faudio32 gst_base32 $(WINE_OBJ32)
|
|||||||
LDFLAGS=-L$(abspath $(TOOLS_DIR32))/lib \
|
LDFLAGS=-L$(abspath $(TOOLS_DIR32))/lib \
|
||||||
PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \
|
PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \
|
||||||
CC=$(CC_QUOTED) \
|
CC=$(CC_QUOTED) \
|
||||||
CXX=$(CXX_QUOTED) \
|
CROSSCC=$(CROSSCC32_QUOTED) \
|
||||||
PKG_CONFIG="$(PKG_CONFIG32)" \
|
PKG_CONFIG="$(PKG_CONFIG32)" \
|
||||||
CROSSDEBUG=split-dwarf
|
CROSSDEBUG=split-dwarf
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user