Skip to content
Snippets Groups Projects
Verified Commit 8094b644 authored by Recolic Keghart's avatar Recolic Keghart
Browse files

add icpc build script

parent ce750fef
No related branches found
No related tags found
No related merge requests found
Pipeline #809 failed with stages
in 2 minutes and 46 seconds
...@@ -17,6 +17,12 @@ build: ...@@ -17,6 +17,12 @@ build:
- nemu/testcases.log - nemu/testcases.log
expire_in: 1 week expire_in: 1 week
build-icc-pgo:
stage: build
script:
- pacman -Sy && pacman -S --noconfirm bison flex gettext sdl2 lib32-glibc grep
- export AM_HOME=$(pwd)/nexus-am/
- cd nemu && ./icc-build.sh
test: test:
stage: test stage: test
......
File deleted
...@@ -16,12 +16,11 @@ include Makefile.git ...@@ -16,12 +16,11 @@ include Makefile.git
.DEFAULT_GOAL = app .DEFAULT_GOAL = app
# Compilation flags # Compilation flags
CXX = icpc CXX ?= g++
LD = $(CXX) LD = $(CXX)
EXTRA_FLAGS ?= -prof-use
INCLUDES = $(addprefix -I, $(INC_DIR)) INCLUDES = $(addprefix -I, $(INC_DIR))
CFLAGS += -O3 -MMD -Wall $(INCLUDES) -fomit-frame-pointer -std=c++17 CFLAGS += -O3 -MMD -Wall $(INCLUDES) -fomit-frame-pointer -std=c++17
CFLAGS += -no-ansi-alias -DDISABLE_MMIO -no-complex-limited-range -qopt-prefetch=2 $(EXTRA_FLAGS) CFLAGS += $(EXTRA_FLAGS)
# CFLAGS += -DDIFF_TEST_QEMU # CFLAGS += -DDIFF_TEST_QEMU
# Source code generation before any targets. # Source code generation before any targets.
...@@ -70,3 +69,4 @@ clean: ...@@ -70,3 +69,4 @@ clean:
$(MAKE) -C tools/gen-expr clean $(MAKE) -C tools/gen-expr clean
$(MAKE) -C tools/qemu-diff clean $(MAKE) -C tools/qemu-diff clean
$(MAKE) -C $(SUBDIRS) clean $(MAKE) -C $(SUBDIRS) clean
rm -f *.dyn pgopti.dpi*
#!/bin/bash
xflags="-no-ansi-alias -DDISABLE_MMIO -no-complex-limited-range -qopt-prefetch=2"
cpus=$(grep -c '^processor' /proc/cpuinfo)
make clean &&
make EXTRA_FLAGS="$xflags -prof-gen" CXX=icpc -j$cpus &&
make -C "$AM_HOME/apps/microbench" ARCH=x86-nemu &&
build/nemu -b "$AM_HOME/apps/microbench/build/microbench-x86-nemu.bin" &&
make clean &&
make EXTRA_FLAGS="$xflags -prof-use" CXX=icpc -j$cpus
exit $?
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment