Skip to content
Permalink
Browse files

Make build deterministic and do not rebuild on release2 (#729)

* sort dbc files to make linking deterministic

* touch all files on release2 checkout to prevent rebuild
  • Loading branch information...
pd0wm committed Jul 3, 2019
1 parent be020bd commit 60a20537c5f3fcc7f11946d81aebc8f90c08c117
Showing with 11 additions and 4 deletions.
  1. +10 −3 launch_chffrplus.sh
  2. +1 −1 selfdrive/can/Makefile
@@ -13,9 +13,16 @@ fi
function launch {
# apply update
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
git reset --hard @{u} &&
git clean -xdf &&
exec "${BASH_SOURCE[0]}"
git reset --hard @{u} &&
git clean -xdf &&

# Touch all files on release2 after checkout to prevent rebuild
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" == "release2" ]]; then
touch **
fi

exec "${BASH_SOURCE[0]}"
fi

# no cpu rationing for now
@@ -38,7 +38,7 @@ OBJDIR = obj

OPENDBC_PATH := $(shell python2 -c 'import opendbc; print opendbc.DBC_PATH')

DBC_SOURCES := $(wildcard $(OPENDBC_PATH)/*.dbc)
DBC_SOURCES := $(sort $(wildcard $(OPENDBC_PATH)/*.dbc))
DBC_OBJS := $(patsubst $(OPENDBC_PATH)/%.dbc,$(OBJDIR)/%.o,$(DBC_SOURCES))
DBC_CCS := $(patsubst $(OPENDBC_PATH)/%.dbc,dbc_out/%.cc,$(DBC_SOURCES))
.SECONDARY: $(DBC_CCS)

0 comments on commit 60a2053

Please sign in to comment.
You can’t perform that action at this time.