Skip to content

Commit

Permalink
Fix profiler run option (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcauberer authored May 31, 2024
1 parent 4cc9ac9 commit 72faeb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
6 changes: 3 additions & 3 deletions Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ endif ()
option(SPICE_PROF_COMPILE "Profiler build for Spice" OFF)
if (SPICE_PROF_COMPILE)
message(STATUS "Spice: Profiler build for Spice is enabled.")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -O0")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer -O0")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -fno-omit-frame-pointer -O0")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -fno-omit-frame-pointer -O0")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -g -fno-omit-frame-pointer -O0")
else ()
message(STATUS "Spice: Profiler build for Spice is disabled.")
endif ()
Expand Down
20 changes: 1 addition & 19 deletions media/test-project/test.spice
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
import "std/os/env";
import "std/io/filepath";
import "bootstrap/lexer/lexer";

f<int> main() {
String filePathString = getEnv("SPICE_STD_DIR") + "/../test/test-files/bootstrap-compiler/standalone-lexer-test/test-file.spice";
FilePath filePath = FilePath(filePathString);
Lexer lexer = Lexer(filePath);
unsigned long tokenCount = 0l;
while (!lexer.isEOF()) {
Token token = lexer.getToken();
token.print();
lexer.advance();
tokenCount++;
}
printf("\nLexed tokens: %d\n", tokenCount);
}

/*import "std/os/env";
import "std/io/filepath";
import "bootstrap/ast/ast-nodes";
import "bootstrap/lexer/lexer";
import "bootstrap/parser/parser";
Expand All @@ -30,4 +12,4 @@ f<int> main() {
ASTEntryNode* ast = parser.parse();
assert ast != nil<ASTEntryNode*>;
printf("All assertions passed!\n");
}*/
}

0 comments on commit 72faeb7

Please sign in to comment.