Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
educg-net-26173-2487151
sysy-compiler-1811
Commits
aeb370aa
Commit
aeb370aa
authored
10 months ago
by
F Ch
Browse files
Options
Download
Patches
Plain Diff
update CMakeLists and README
parent
92053ae0
main
submit0820
zzh-callsite-dev1
zzh-pure-mem-dev
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+17
-35
CMakeLists.txt
README.md
+1
-1
README.md
with
18 additions
and
36 deletions
+18
-36
CMakeLists.txt
+
17
−
35
View file @
aeb370aa
...
...
@@ -10,42 +10,24 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
# 确保 RTTI 开启
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-frtti"
)
# 设置两个可能的路径
set
(
GENERATED_DIR
"
${
CMAKE_SOURCE_DIR
}
/src/frontend/generated"
)
set
(
GENERATED2_DIR
"
${
CMAKE_SOURCE_DIR
}
/src/frontend/generated2"
)
# 检查 generated2 目录是否存在
if
(
EXISTS
"
${
GENERATED2_DIR
}
"
)
message
(
STATUS
"Using generated2 directory"
)
include_directories
(
"
${
GENERATED2_DIR
}
"
)
# 源文件列表
file
(
GLOB SOURCES
"src/main.cpp"
"src/common/*.cpp"
"src/backend/*.cpp"
"src/frontend/*.cpp"
"src/frontend/generated2/*.cpp"
"src/midend/ir/*.cpp"
"src/midend/dfa/*.cpp"
"src/midend/opt/*.cpp"
"src/midend/opt/context/*.cpp"
)
else
()
message
(
STATUS
"Using generated directory"
)
include_directories
(
"
${
GENERATED_DIR
}
"
)
# 源文件列表
file
(
GLOB SOURCES
"src/main.cpp"
"src/common/*.cpp"
"src/backend/*.cpp"
"src/frontend/*.cpp"
"src/frontend/generated/*.cpp"
"src/midend/ir/*.cpp"
"src/midend/dfa/*.cpp"
"src/midend/opt/*.cpp"
"src/midend/opt/context/*.cpp"
)
endif
()
message
(
STATUS
"Using generated directory"
)
include_directories
(
"
${
GENERATED_DIR
}
"
)
# 源文件列表
file
(
GLOB SOURCES
"src/main.cpp"
"src/common/*.cpp"
"src/backend/*.cpp"
"src/frontend/*.cpp"
"src/frontend/generated/*.cpp"
"src/midend/ir/*.cpp"
"src/midend/dfa/*.cpp"
"src/midend/opt/*.cpp"
"src/midend/opt/context/*.cpp"
)
# 包含目录
include_directories
(
src
)
...
...
This diff is collapsed.
Click to expand it.
README.md
+
1
−
1
View file @
aeb370aa
...
...
@@ -166,7 +166,7 @@ compiler -S -o getint.s getint.sy
-
汇编并链接运行时库
```
shell
riscv64-linux-gnu-gcc getint.s
-o
getint.bin
-L
/
home/zeroregister/CompilerCompetition
/sysy-compiler/sysy_runtime
-lsysy
riscv64-linux-gnu-gcc getint.s
-o
getint.bin
-L
/
root
/sysy-compiler/sysy_runtime
-lsysy
```
-
运行
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets