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
e6e8069e
Commit
e6e8069e
authored
Jan 11, 2019
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Luaへの埋め込みを追加
parent
157148f4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
0 deletions
+87
-0
.gitmodules
.gitmodules
+3
-0
Makefile
example/Makefile
+2
-0
Makefile
example/lua/Makefile
+76
-0
lua
example/lua/lua
+1
-0
aggregate.zsh
scripts/aggregate.zsh
+4
-0
analyze.zsh
scripts/analyze.zsh
+1
-0
No files found.
.gitmodules
View file @
e6e8069e
...
@@ -4,3 +4,6 @@
...
@@ -4,3 +4,6 @@
[submodule "example/zlib/zlib"]
[submodule "example/zlib/zlib"]
path = example/zlib/zlib
path = example/zlib/zlib
url = git@github.com:madler/zlib.git
url = git@github.com:madler/zlib.git
[submodule "example/lua/lua"]
path = example/lua/lua
url = git://github.com/lua/lua.git
example/Makefile
View file @
e6e8069e
...
@@ -4,6 +4,7 @@ all:
...
@@ -4,6 +4,7 @@ all:
${
MAKE
}
-C
fizzbuzz all
${
MAKE
}
-C
fizzbuzz all
${
MAKE
}
-C
8cc all
${
MAKE
}
-C
8cc all
${
MAKE
}
-C
zlib all
${
MAKE
}
-C
zlib all
${
MAKE
}
-C
lua all
${
MAKE
}
-C
fizzbuzz-rs all
${
MAKE
}
-C
fizzbuzz-rs all
${
MAKE
}
-C
numguess-rs all
${
MAKE
}
-C
numguess-rs all
...
@@ -11,6 +12,7 @@ test:
...
@@ -11,6 +12,7 @@ test:
${
MAKE
}
-C
fizzbuzz
test
${
MAKE
}
-C
fizzbuzz
test
${
MAKE
}
-C
8cc
test
${
MAKE
}
-C
8cc
test
${
MAKE
}
-C
zlib
test
${
MAKE
}
-C
zlib
test
${
MAKE
}
-C
lua
test
${
MAKE
}
-C
fizzbuzz-rs
test
${
MAKE
}
-C
fizzbuzz-rs
test
${
MAKE
}
-C
numguess-rs
test
${
MAKE
}
-C
numguess-rs
test
...
...
example/lua/Makefile
0 → 100644
View file @
e6e8069e
include
../../common.mk
WATERMARK
:=
lua-watermarking
CFLAGS
:=
-O2
-DNDEBUG
-DLUA_USE_LINUX
LDFLAGS
:=
-lm
-ldl
SRCS
:=
\
lua/lapi.c
\
lua/lauxlib.c
\
lua/lbaselib.c
\
lua/lcode.c
\
lua/lcorolib.c
\
lua/lctype.c
\
lua/ldblib.c
\
lua/ldebug.c
\
lua/ldo.c
\
lua/ldump.c
\
lua/lfunc.c
\
lua/lgc.c
\
lua/linit.c
\
lua/liolib.c
\
lua/llex.c
\
lua/lmathlib.c
\
lua/lmem.c
\
lua/loadlib.c
\
lua/lobject.c
\
lua/lopcodes.c
\
lua/loslib.c
\
lua/lparser.c
\
lua/lstate.c
\
lua/lstring.c
\
lua/lstrlib.c
\
lua/ltable.c
\
lua/ltablib.c
\
lua/ltests.c
\
lua/ltm.c
\
lua/lua.c
\
lua/lundump.c
\
lua/lutf8lib.c
\
lua/lvm.c
\
lua/lzio.c
LLS
:=
${
SRCS
:lua/%.c
=
${
OBJ_DIR
}
/%.ll
}
LLS_WM
:=
${
LLS
:%.ll
=%-wm.ll
}
OBJS
:=
${
LLS
:.ll
=.o
}
OBJS_WM
:=
${
LLS_WM
:.ll
=.o
}
.PRECIOUS
:
${LLS} ${LLS_WM}
all
:
\
${BIN_DIR}/lua
\
${BIN_DIR}/lua-wm
test
:
\
${BIN_DIR}/lua
\
${BIN_DIR}/lua-wm
${BIN_DIR}/lua
:
${OBJS}
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-o
$@
$^
${
LDFLAGS
}
${BIN_DIR}/lua-wm
:
${OBJS_WM}
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-o
$@
$^
${
LDFLAGS
}
${OBJ_DIR}/%.o
:
${OBJ_DIR}/%.ll
clang
${
CFLAGS
}
-o
$@
-c
$^
${OBJ_DIR}/%.ll
:
lua/%.c
@
mkdir
-p
${
@D
}
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
}
lua
@
4ace93ca
Subproject commit 4ace93ca6502dd1da38d5c06fa099d229e791ba8
scripts/aggregate.zsh
View file @
e6e8069e
...
@@ -48,6 +48,8 @@ echo "==== 8cc block-wm ===="
...
@@ -48,6 +48,8 @@ echo "==== 8cc block-wm ===="
h1 obj/example/8cc/stage1-wm/
*
-block-wm
.txt
h1 obj/example/8cc/stage1-wm/
*
-block-wm
.txt
echo
"==== zlib block-wm ===="
echo
"==== zlib block-wm ===="
h1 obj/example/zlib/zlib-block-wm/
*
-block-wm
.txt
h1 obj/example/zlib/zlib-block-wm/
*
-block-wm
.txt
echo
"==== lua block-wm ===="
h1 obj/example/lua/
*
-block-wm
.txt
echo
"==== fizzbuzz-rs block-wm ===="
echo
"==== fizzbuzz-rs block-wm ===="
h1 obj/example/fizzbuzz-rs/
*
-block-wm
.txt
h1 obj/example/fizzbuzz-rs/
*
-block-wm
.txt
echo
"==== numguess-rs block-wm ===="
echo
"==== numguess-rs block-wm ===="
...
@@ -57,6 +59,8 @@ echo "==== 8cc inst-wm ===="
...
@@ -57,6 +59,8 @@ echo "==== 8cc inst-wm ===="
h2 obj/example/8cc/stage1-wm/
*
-inst-wm
.txt
h2 obj/example/8cc/stage1-wm/
*
-inst-wm
.txt
echo
"==== zlib inst-wm ===="
echo
"==== zlib inst-wm ===="
h2 obj/example/zlib/zlib-inst-wm/
*
-inst-wm
.txt
h2 obj/example/zlib/zlib-inst-wm/
*
-inst-wm
.txt
echo
"==== lua inst-wm ===="
h2 obj/example/lua/
*
-inst-wm
.txt
echo
"==== fizzbuzz-rs inst-wm ===="
echo
"==== fizzbuzz-rs inst-wm ===="
h2 obj/example/fizzbuzz-rs/
*
-inst-wm
.txt
h2 obj/example/fizzbuzz-rs/
*
-inst-wm
.txt
echo
"==== numguess-rs inst-wm ===="
echo
"==== numguess-rs inst-wm ===="
...
...
scripts/analyze.zsh
View file @
e6e8069e
...
@@ -23,3 +23,4 @@ h() {
...
@@ -23,3 +23,4 @@ h() {
h
`
ls
example/8cc/8cc/
*
.c |
awk
-F
'example/8cc/8cc/utiltest.c'
'{print $NF}'
`
h
`
ls
example/8cc/8cc/
*
.c |
awk
-F
'example/8cc/8cc/utiltest.c'
'{print $NF}'
`
h example/zlib/zlib/
*
.c
h example/zlib/zlib/
*
.c
h example/lua/lua/
*
.c
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