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-18973-1895971
Compiler2023-CarrotCompiler
Commits
b938d3dd
Commit
b938d3dd
authored
1 year ago
by
YZK
Browse files
Options
Download
Patches
Plain Diff
fix: Cmake IR compilation
parent
efd8d4a6
main
Opt
Opt2
dev-new-regalloca
dev-nord-local
dev-nord-test
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-0
CMakeLists.txt
runtime/CMakeLists.txt
+1
-1
runtime/CMakeLists.txt
test/CMakeLists.txt
+3
-0
test/CMakeLists.txt
with
5 additions
and
1 deletion
+5
-1
CMakeLists.txt
+
1
−
0
View file @
b938d3dd
...
...
@@ -7,6 +7,7 @@ project(CarrotCompiler VERSION 0.1
# Common build options
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-O0"
)
# set(BUILD_IR_TESTING true)
# Generic includes
set
(
INCLUDE_DIRECTORIES
"
${
PROJECT_SOURCE_DIR
}
/include"
)
...
...
This diff is collapsed.
Click to expand it.
runtime/CMakeLists.txt
+
1
−
1
View file @
b938d3dd
...
...
@@ -14,7 +14,7 @@ set(SOURCE_FILES "${PROJECT_SOURCE_DIR}/src/sylib.c")
if
(
BUILD_IR_TESTING
)
add_custom_target
(
sysy-ir ALL
COMMAND
${
CMAKE_C_COMPILER
}
${
CMAKE_C_FLAGS
}
COMMAND
clang
${
CMAKE_C_FLAGS
}
-I
${
INCLUDE_DIRECTORY
}
-S -emit-llvm
${
SOURCE_FILES
}
...
...
This diff is collapsed.
Click to expand it.
test/CMakeLists.txt
+
3
−
0
View file @
b938d3dd
...
...
@@ -8,6 +8,9 @@ set(PERFORMANCE_TESTS_DIR
set
(
FINAL_PERFORMANCE_TESTS_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/case/final_performance"
)
# set(BUILD_PERFORMANCE_TESTS true)
# set(BUILD_IR_TESTING true)
# Define test function
function
(
add_test_dir testdir
)
file
(
GLOB files
"
${
testdir
}
/*.sy"
)
...
...
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