Speed up C++ compilation
This commit is contained in:
parent
0ce98a7e0c
commit
e9d3a650a4
2
Makefrag
2
Makefrag
@ -2,7 +2,7 @@
|
||||
|
||||
MODEL := Top
|
||||
CXX := g++
|
||||
CXXFLAGS := -O2
|
||||
CXXFLAGS := -O1
|
||||
|
||||
SBT := java -Xmx2048M -Xss8M -XX:MaxPermSize=128M -jar sbt-launch.jar
|
||||
|
||||
|
2
chisel
2
chisel
@ -1 +1 @@
|
||||
Subproject commit 3b1979d8a182d9fa8a65ce0523581f353f9f4603
|
||||
Subproject commit 5c3fc63f3d58ede49a01689224f2630954a0924f
|
@ -18,22 +18,30 @@ DEBUG_OBJS := $(addsuffix -debug.o,$(CXXSRCS) $(MODEL))
|
||||
CHISEL_ARGS := $(MODEL) --noIoDebug --backend c --targetDir emulator/generated-src
|
||||
CHISEL_ARGS_DEBUG := $(CHISEL_ARGS)-debug --debug --vcd --ioDebug
|
||||
|
||||
generated-src/$(MODEL).cpp: $(base_dir)/rocket/$(src_path)/*.scala $(base_dir)/hwacha/$(src_path)/*.scala $(base_dir)/uncore/$(src_path)/*.scala $(base_dir)/$(src_path)/*.scala
|
||||
generated-src/$(MODEL).h: $(base_dir)/rocket/$(src_path)/*.scala $(base_dir)/hwacha/$(src_path)/*.scala $(base_dir)/uncore/$(src_path)/*.scala $(base_dir)/$(src_path)/*.scala
|
||||
cd $(base_dir) && $(SBT) "project referencechip" "elaborate $(CHISEL_ARGS)"
|
||||
|
||||
generated-src-debug/$(MODEL).cpp: $(base_dir)/rocket/$(src_path)/*.scala $(base_dir)/hwacha/$(src_path)/*.scala $(base_dir)/uncore/$(src_path)/*.scala $(base_dir)/$(src_path)/*.scala
|
||||
generated-src-debug/$(MODEL).h: $(base_dir)/rocket/$(src_path)/*.scala $(base_dir)/hwacha/$(src_path)/*.scala $(base_dir)/uncore/$(src_path)/*.scala $(base_dir)/$(src_path)/*.scala
|
||||
cd $(base_dir) && $(SBT) "project referencechip" "elaborate $(CHISEL_ARGS_DEBUG)"
|
||||
|
||||
$(MODEL).o: %.o: generated-src/%.cpp
|
||||
$(MODEL).o: %.o: generated-src/%.h
|
||||
$(MAKE) -j $(patsubst %.cpp,%.o,$(shell ls generated-src/$(MODEL)-*.cpp))
|
||||
$(LD) -r $(patsubst %.cpp,%.o,$(shell ls generated-src/$(MODEL)-*.cpp)) -o $@
|
||||
|
||||
$(MODEL)-debug.o: %-debug.o: generated-src-debug/%.h
|
||||
$(MAKE) -j $(patsubst %.cpp,%.o,$(shell ls generated-src-debug/$(MODEL)-*.cpp))
|
||||
$(LD) -r $(patsubst %.cpp,%.o,$(shell ls generated-src-debug/$(MODEL)-*.cpp)) -o $@
|
||||
|
||||
$(wildcard generated-src/*.o): %.o: %.cpp generated-src/$(MODEL).h
|
||||
$(CXX) $(CXXFLAGS) -Igenerated-src -c -o $@ $<
|
||||
|
||||
$(MODEL)-debug.o: %-debug.o: generated-src-debug/%.cpp
|
||||
$(wildcard generated-src-debug/*.o): %.o: %.cpp generated-src-debug/$(MODEL).h
|
||||
$(CXX) $(CXXFLAGS) -Igenerated-src-debug -c -o $@ $<
|
||||
|
||||
$(addsuffix .o,$(CXXSRCS)): %.o: $(base_dir)/csrc/%.cc $(base_dir)/csrc/*.h generated-src/$(MODEL).cpp
|
||||
$(addsuffix .o,$(CXXSRCS)): %.o: $(base_dir)/csrc/%.cc $(base_dir)/csrc/*.h generated-src/$(MODEL).h
|
||||
$(CXX) $(CXXFLAGS) -Igenerated-src -c -o $@ $<
|
||||
|
||||
$(addsuffix -debug.o,$(CXXSRCS)): %-debug.o: $(base_dir)/csrc/%.cc $(base_dir)/csrc/*.h generated-src-debug/$(MODEL).cpp
|
||||
$(addsuffix -debug.o,$(CXXSRCS)): %-debug.o: $(base_dir)/csrc/%.cc $(base_dir)/csrc/*.h generated-src-debug/$(MODEL).h
|
||||
$(CXX) $(CXXFLAGS) -Igenerated-src-debug -c -o $@ $<
|
||||
|
||||
emulator: $(OBJS) libdramsim.a
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit ac7ec37adf725caf9291d813e46826a9a7cab22c
|
||||
Subproject commit d1269259151b25e7a7a1ddc22bf85b92cd732118
|
@ -1 +1 @@
|
||||
Subproject commit df4967acd1a511517977feb63eabd647e6a00701
|
||||
Subproject commit 7bf1cfb4bc537f8854b298cf4565974dcc2b85b9
|
2
rocket
2
rocket
@ -1 +1 @@
|
||||
Subproject commit cceb29c281b6fc8d5aa1ac025d18854db13f10bb
|
||||
Subproject commit 94ebacced6aa2bf1e7e0761a0fb0e547d172ee12
|
Loading…
Reference in New Issue
Block a user