Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llvm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
llvm-watermarker
Commits
8b51dbaf
Commit
8b51dbaf
authored
Jan 12, 2019
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ビルドタイプごとに出力ディレクトリを分けるように変更
parent
e6e8069e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
28 deletions
+34
-28
common.mk
common.mk
+4
-2
cxx.mk
cxx.mk
+4
-0
Makefile
example/8cc/Makefile
+2
-2
Makefile
example/fizzbuzz-rs/Makefile
+2
-2
Makefile
example/fizzbuzz/Makefile
+4
-4
Makefile
example/lua/Makefile
+2
-2
Makefile
example/numguess-rs/Makefile
+2
-2
Makefile
example/zlib/Makefile
+4
-4
aggregate.zsh
scripts/aggregate.zsh
+10
-10
No files found.
common.mk
View file @
8b51dbaf
.DEFAULT_GOAL := all
BUILD_TYPE := debug
ROOT := $(realpath ${PWD})
CD := $(realpath ${CURDIR})
BIN_DIR := ${ROOT}/bin${CD:${ROOT}%=%}
OBJ_DIR := ${ROOT}/obj${CD:${ROOT}%=%}
BIN_DIR := ${ROOT}/bin
/${BUILD_TYPE}
${CD:${ROOT}%=%}
OBJ_DIR := ${ROOT}/obj
/${BUILD_TYPE}
${CD:${ROOT}%=%}
.PHONY: all test clean
...
...
cxx.mk
View file @
8b51dbaf
...
...
@@ -13,6 +13,10 @@ CXXFLAGS := \
-fPIC \
-fno-rtti
CXXFLAGS_debug := -O0
CXXFLAGS_release := -O2 -DNDEBUG
CXXFLAGS += ${CXXFLAGS_${BUILD_TYPE}}
OBJS := ${SRCS:%.cpp=${OBJ_DIR}/%.o}
DEPS := ${OBJS:.o=.d}
...
...
example/8cc/Makefile
View file @
8b51dbaf
...
...
@@ -70,8 +70,8 @@ ${OBJ_DIR}/stage3/%.o: 8cc/%.c ${BIN_DIR}/stage2/8cc.out
${OBJ_DIR}/stage1-wm/%.o
:
8cc/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-S
-emit-llvm
-o
${
@
:%.o
=%.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-block-wm.ll
}
${
@
:%.o
=%.ll
}
2>
${
@
:%.o
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-inst-wm.ll
}
${
@
:%.o
=%-block-wm.ll
}
2>
${
@
:%.o
=%-inst-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-block-wm.ll
}
${
@
:%.o
=%.ll
}
2>
${
@
:%.o
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-inst-wm.ll
}
${
@
:%.o
=%-block-wm.ll
}
2>
${
@
:%.o
=%-inst-wm.txt
}
clang
${
CFLAGS
}
-o
$@
-c
${
@
:%.o
=%-inst-wm.ll
}
${OBJ_DIR}/stage2-wm/%.o
:
8cc/%.c ${BIN_DIR}/stage1-wm/8cc.out
...
...
example/fizzbuzz-rs/Makefile
View file @
8b51dbaf
...
...
@@ -20,8 +20,8 @@ ${OBJ_DIR}/fizzbuzz.ll: fizzbuzz.rs
${OBJ_DIR}/fizzbuzz-wm.ll
:
${OBJ_DIR}/fizzbuzz.ll
@
mkdir
-p
${
@D
}
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
rust-project
-S
-o
${
@
:%-wm.ll
=%-block.ll
}
$<
2>
${
@
:%-wm.ll
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
rust-project
-S
-o
$@
${
@
:%-wm.ll
=%-block.ll
}
2>
${
@
:%-wm.ll
=%-inst-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-block-wm
-watermark
=
rust-project
-S
-o
${
@
:%-wm.ll
=%-block.ll
}
$<
2>
${
@
:%-wm.ll
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-inst-wm
-watermark
=
rust-project
-S
-o
$@
${
@
:%-wm.ll
=%-block.ll
}
2>
${
@
:%-wm.ll
=%-inst-wm.txt
}
${OBJ_DIR}/probestack.o
:
probestack.s
@
mkdir
-p
${
@D
}
...
...
example/fizzbuzz/Makefile
View file @
8b51dbaf
...
...
@@ -29,13 +29,13 @@ ${OBJ_DIR}/%.ll: %.c
clang
-emit-llvm
-S
-DNDEBUG
-O2
-o
$@
$<
%-0.ll
:
%.ll
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
0
-S
-o
$@
$<
2>
${
@
:.ll
=.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-block-wm
-watermark
=
0
-S
-o
$@
$<
2>
${
@
:.ll
=.txt
}
%-1.ll
:
%.ll
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
1
-S
-o
$@
$<
2>
${
@
:.ll
=.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-block-wm
-watermark
=
1
-S
-o
$@
$<
2>
${
@
:.ll
=.txt
}
%-2.ll
:
%.ll
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
2
-S
-o
$@
$<
2>
${
@
:.ll
=.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-inst-wm
-watermark
=
2
-S
-o
$@
$<
2>
${
@
:.ll
=.txt
}
%-3.ll
:
%.ll
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
3
-S
-o
$@
$<
2>
${
@
:.ll
=.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-inst-wm
-watermark
=
3
-S
-o
$@
$<
2>
${
@
:.ll
=.txt
}
${BIN_DIR}/%.out
:
${OBJ_DIR}/%.ll
@
mkdir
-p
${
@D
}
...
...
example/lua/Makefile
View file @
8b51dbaf
...
...
@@ -72,5 +72,5 @@ ${OBJ_DIR}/%.ll: lua/%.c
clang
${
CFLAGS
}
-S
-emit-llvm
-o
$@
$<
%-wm.ll
:
%.ll
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%-wm.ll
=%-block-wm.ll
}
$<
2>
${
@
:%-wm.ll
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
$@
${
@
:%-wm.ll
=%-block-wm.ll
}
2>
${
@
:%-wm.ll
=%-inst-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%-wm.ll
=%-block-wm.ll
}
$<
2>
${
@
:%-wm.ll
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
$@
${
@
:%-wm.ll
=%-block-wm.ll
}
2>
${
@
:%-wm.ll
=%-inst-wm.txt
}
example/numguess-rs/Makefile
View file @
8b51dbaf
...
...
@@ -26,8 +26,8 @@ target/release/deps/*.ll:
${OBJ_DIR}/numguess-wm.ll
:
${OBJ_DIR}/numguess.ll
@
mkdir
-p
${
@D
}
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
rust-project
-S
-o
${
@
:%-wm.ll
=%-block.ll
}
$<
2>
${
@
:%-wm.ll
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
rust-project
-S
-o
$@
${
@
:%-wm.ll
=%-block.ll
}
2>
${
@
:%-wm.ll
=%-inst-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-block-wm
-watermark
=
rust-project
-S
-o
${
@
:%-wm.ll
=%-block.ll
}
$<
2>
${
@
:%-wm.ll
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-inst-wm
-watermark
=
rust-project
-S
-o
$@
${
@
:%-wm.ll
=%-block.ll
}
2>
${
@
:%-wm.ll
=%-inst-wm.txt
}
${OBJ_DIR}/probestack.o
:
probestack.s
@
mkdir
-p
${
@D
}
...
...
example/zlib/Makefile
View file @
8b51dbaf
...
...
@@ -80,20 +80,20 @@ ${OBJ_DIR}/zlib/%.o: zlib/%.c
${OBJ_DIR}/zlib-block-wm/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-emit-llvm
-S
-o
${
@
:.o
=.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-block-wm.ll
}
${
@
:.o
=.ll
}
2>
${
@
:%.o
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-block-wm.ll
}
${
@
:.o
=.ll
}
2>
${
@
:%.o
=%-block-wm.txt
}
clang
${
CFLAGS
}
-o
$@
-c
${
@
:%.o
=%-block-wm.ll
}
${OBJ_DIR}/zlib-inst-wm/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-emit-llvm
-S
-o
${
@
:.o
=.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-inst-wm.ll
}
${
@
:.o
=.ll
}
2>
${
@
:%.o
=%-inst-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-inst-wm.ll
}
${
@
:.o
=.ll
}
2>
${
@
:%.o
=%-inst-wm.txt
}
clang
${
CFLAGS
}
-o
$@
-c
${
@
:%.o
=%-inst-wm.ll
}
${OBJ_DIR}/zlib-wm/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-emit-llvm
-S
-o
${
@
:.o
=.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-block-wm.ll
}
${
@
:.o
=.ll
}
2> /dev/null
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-inst-wm.ll
}
${
@
:.o
=-block-wm.ll
}
2> /dev/null
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-block-wm.ll
}
${
@
:.o
=.ll
}
2> /dev/null
opt
-load
=
${
ROOT
}
/bin/
${
BUILD_TYPE
}
/
src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-inst-wm.ll
}
${
@
:.o
=-block-wm.ll
}
2> /dev/null
clang
${
CFLAGS
}
-o
$@
-c
${
@
:%.o
=%-inst-wm.ll
}
${OBJ_DIR}/benchmark.o
:
benchmark.cpp
...
...
scripts/aggregate.zsh
View file @
8b51dbaf
...
...
@@ -45,23 +45,23 @@ h2() {
}
echo
"==== 8cc block-wm ===="
h1 obj/example/8cc/stage1-wm/
*
-block-wm
.txt
h1 obj/
$1
/
example/8cc/stage1-wm/
*
-block-wm
.txt
echo
"==== zlib block-wm ===="
h1 obj/example/zlib/zlib-block-wm/
*
-block-wm
.txt
h1 obj/
$1
/
example/zlib/zlib-block-wm/
*
-block-wm
.txt
echo
"==== lua block-wm ===="
h1 obj/example/lua/
*
-block-wm
.txt
h1 obj/
$1
/
example/lua/
*
-block-wm
.txt
echo
"==== fizzbuzz-rs block-wm ===="
h1 obj/example/fizzbuzz-rs/
*
-block-wm
.txt
h1 obj/
$1
/
example/fizzbuzz-rs/
*
-block-wm
.txt
echo
"==== numguess-rs block-wm ===="
h1 obj/example/numguess-rs/
*
-block-wm
.txt
h1 obj/
$1
/
example/numguess-rs/
*
-block-wm
.txt
echo
"==== 8cc inst-wm ===="
h2 obj/example/8cc/stage1-wm/
*
-inst-wm
.txt
h2 obj/
$1
/
example/8cc/stage1-wm/
*
-inst-wm
.txt
echo
"==== zlib inst-wm ===="
h2 obj/example/zlib/zlib-inst-wm/
*
-inst-wm
.txt
h2 obj/
$1
/
example/zlib/zlib-inst-wm/
*
-inst-wm
.txt
echo
"==== lua inst-wm ===="
h2 obj/example/lua/
*
-inst-wm
.txt
h2 obj/
$1
/
example/lua/
*
-inst-wm
.txt
echo
"==== fizzbuzz-rs inst-wm ===="
h2 obj/example/fizzbuzz-rs/
*
-inst-wm
.txt
h2 obj/
$1
/
example/fizzbuzz-rs/
*
-inst-wm
.txt
echo
"==== numguess-rs inst-wm ===="
h2 obj/example/numguess-rs/
*
-inst-wm
.txt
h2 obj/
$1
/
example/numguess-rs/
*
-inst-wm
.txt
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment