Skip to content

Commit

Permalink
Don't use rsync command in build
Browse files Browse the repository at this point in the history
  • Loading branch information
ushitora-anqou committed Jun 16, 2020
1 parent 1bd4afe commit be9cc03
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ FROM nvidia/cuda:10.1-devel-ubuntu18.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y \
RUN apt-get update && apt-get install -y \
build-essential git curl software-properties-common openjdk-11-jre \
libstdc++-8-dev clang-9 clang-8 rsync bison flex libreadline-dev \
libstdc++-8-dev clang-9 clang-8 bison flex libreadline-dev \
gawk tcl-dev libffi-dev graphviz xdot pkg-config python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-dev zlib1g-dev
libboost-python-dev libboost-filesystem-dev zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN ln -sf /usr/bin/clang-9 /usr/local/bin/clang
RUN ln -sf /usr/bin/clang++-9 /usr/local/bin/clang++
Expand Down
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ all: prepare \
prepare:
mkdir -p build/bin
mkdir -p build/share/kvsp
rsync -a --delete share/* build/share/kvsp/
cp -a share/* build/share/kvsp/

build/kvsp:
mkdir -p build/kvsp
Expand All @@ -31,7 +31,7 @@ build/kvsp:
-X main.cahpSimRevision=$$(git -C ../cahp-sim rev-parse --short HEAD || echo "unk") \
-X main.llvmCahpRevision=$$(git -C ../llvm-cahp rev-parse --short HEAD || echo "unk") \
-X main.yosysRevision=$$(git -C ../yosys rev-parse --short HEAD || echo "unk")"
cp build/kvsp/kvsp build/bin/
cp -a build/kvsp/kvsp build/bin/

build/Iyokan:
mkdir -p build/Iyokan
Expand All @@ -41,8 +41,8 @@ build/Iyokan:
-DIYOKAN_ENABLE_CUDA=$(ENABLE_CUDA) \
../../Iyokan && \
$(MAKE) iyokan iyokan-packet
cp build/Iyokan/bin/iyokan build/bin/
cp build/Iyokan/bin/iyokan-packet build/bin/
cp -a build/Iyokan/bin/iyokan build/bin/
cp -a build/Iyokan/bin/iyokan-packet build/bin/

build/cahp-sim:
mkdir -p build/cahp-sim
Expand All @@ -51,24 +51,24 @@ build/cahp-sim:
-DCMAKE_BUILD_TYPE="Release" \
../../cahp-sim && \
$(MAKE) cahp-sim
cp build/cahp-sim/src/cahp-sim build/bin/
cp -a build/cahp-sim/src/cahp-sim build/bin/

build/cahp-ruby:
rsync -a --delete cahp-ruby/ build/cahp-ruby/
cp -a cahp-ruby build/
cd build/cahp-ruby && sbt run

# NOTE: build/cahp-pearl is "fake" dependency;
# parallel `sbt run` may cause some problems about file lock.
build/cahp-pearl: build/cahp-ruby
rsync -a --delete cahp-pearl/ build/cahp-pearl/
cp -a cahp-pearl build/
cd build/cahp-pearl && sbt run

build/yosys:
rsync -a --delete yosys build/
cp -a yosys build/
cd build/yosys && $(MAKE)

build/Iyokan-L1:
cp -r Iyokan-L1 build/
cp -a Iyokan-L1 build/
cd build/Iyokan-L1 && dotnet build

build/cahp-ruby/vsp-core-ruby.json: build/cahp-ruby build/yosys
Expand All @@ -95,13 +95,13 @@ build/llvm-cahp:
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="CAHP" \
../../llvm-cahp/llvm && \
$(MAKE)
rsync -a build/llvm-cahp/bin/ build/bin/
cp -a build/llvm-cahp/bin/* build/bin/

build/cahp-rt: build/llvm-cahp
cp -r cahp-rt build/
cp -a cahp-rt build/
cd build/cahp-rt && CC=../llvm-cahp/bin/clang $(MAKE)
mkdir -p build/share/kvsp/cahp-rt
cd build/cahp-rt && \
cp crt0.o libc.a cahp.lds ../share/kvsp/cahp-rt/
cp -a crt0.o libc.a cahp.lds ../share/kvsp/cahp-rt/

.PHONY: all prepare

0 comments on commit be9cc03

Please sign in to comment.