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
7e3b91b0
Commit
7e3b91b0
authored
Nov 25, 2018
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コンパイラフラグの整理
parent
cad8c82e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
Makefile
example/8cc/Makefile
+10
-6
Makefile
example/zlib/Makefile
+2
-1
No files found.
example/8cc/Makefile
View file @
7e3b91b0
...
...
@@ -5,6 +5,10 @@ WATERMARK := 77
CC
:=
clang
CFLAGS
:=
\
-DBUILD_DIR
=
"
\"
$$
PWD/8cc
\"
"
\
-O2
8CCFLAGS
:=
\
-DBUILD_DIR
=
"
\"
$$
PWD/8cc
\"
"
LDFLAGS
:=
\
...
...
@@ -51,15 +55,15 @@ ${BIN_DIR}/stage3-wm/8cc.out: ${SRCS:8cc/%.c=${OBJ_DIR}/stage3-wm/%.o}
# Normal 8cc.
${OBJ_DIR}/stage1/%.o
:
8cc/%.c
@
mkdir
-p
${
@D
}
${
CC
}
${
CFLAGS
}
-
O2
-
o
$@
-c
$<
${
CC
}
${
CFLAGS
}
-o
$@
-c
$<
${OBJ_DIR}/stage2/%.o
:
8cc/%.c ${BIN_DIR}/stage1/8cc.out
@
mkdir
-p
${
@D
}
${
BIN_DIR
}
/stage1/8cc.out
-w
${
CFLAGS
}
-o
$@
-c
$<
${
BIN_DIR
}
/stage1/8cc.out
-w
${
8C
CFLAGS
}
-o
$@
-c
$<
${OBJ_DIR}/stage3/%.o
:
8cc/%.c ${BIN_DIR}/stage2/8cc.out
@
mkdir
-p
${
@D
}
${
BIN_DIR
}
/stage2/8cc.out
-w
${
CFLAGS
}
-o
$@
-c
$<
${
BIN_DIR
}
/stage2/8cc.out
-w
${
8C
CFLAGS
}
-o
$@
-c
$<
# Watermarked 8cc
${OBJ_DIR}/stage1-wm/%.o
:
${OBJ_DIR}/stage1-wm/%-wm.ll
...
...
@@ -68,16 +72,16 @@ ${OBJ_DIR}/stage1-wm/%.o: ${OBJ_DIR}/stage1-wm/%-wm.ll
${OBJ_DIR}/stage1-wm/%-wm.ll
:
8cc/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-
O2
-
S
-emit-llvm
-o
${
@
:%-wm.ll
=%.ll
}
$<
clang
${
CFLAGS
}
-S
-emit-llvm
-o
${
@
:%-wm.ll
=%.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
$@
${
@
:%-wm.ll
=%.ll
}
2>
${
@
:%-wm.ll
=%-log.txt
}
${OBJ_DIR}/stage2-wm/%.o
:
8cc/%.c ${BIN_DIR}/stage1-wm/8cc.out
@
mkdir
-p
${
@D
}
${
BIN_DIR
}
/stage1-wm/8cc.out
-w
${
CFLAGS
}
-o
$@
-c
$<
${
BIN_DIR
}
/stage1-wm/8cc.out
-w
${
8C
CFLAGS
}
-o
$@
-c
$<
${OBJ_DIR}/stage3-wm/%.o
:
8cc/%.c ${BIN_DIR}/stage2-wm/8cc.out
@
mkdir
-p
${
@D
}
${
BIN_DIR
}
/stage2-wm/8cc.out
-w
${
CFLAGS
}
-o
$@
-c
$<
${
BIN_DIR
}
/stage2-wm/8cc.out
-w
${
8C
CFLAGS
}
-o
$@
-c
$<
%.out
:
@
mkdir
-p
${
@D
}
...
...
example/zlib/Makefile
View file @
7e3b91b0
...
...
@@ -6,7 +6,8 @@ CC := clang
CFLAGS
:=
\
-D_LARGEFILE64_SOURCE
=
1
\
-DHAVE_HIDDEN
-DHAVE_HIDDEN
\
-O2
SRCS
:=
\
zlib/adler32.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