-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow build with external dependencies #42
base: master
Are you sure you want to change the base?
Changes from all commits
ef0cd24
993b952
6ab5f5f
f049a41
b270da9
2e72e34
0a92cf7
274f97a
defbe9e
07ad7b1
cadd6bf
dd207bf
1f717a8
1c1e9e2
31e9f66
e93538b
bff2671
7a4847d
c1450ce
39149c8
35b9364
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
add_subdirectory(common) | ||
add_subdirectory(shady) | ||
add_subdirectory(runtime) | ||
|
||
if (${BUILD_RUNTIME}) | ||
add_subdirectory(runtime) | ||
endif () | ||
|
||
add_subdirectory(driver) | ||
add_subdirectory(frontend) | ||
add_subdirectory(backend) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,13 +160,11 @@ void generate_node_ctor(Growy* g, json_object* src, json_object* nodes) { | |
shd_growy_append_formatted(g, " {\n"); | ||
shd_growy_append_formatted(g, "\tNode node;\n"); | ||
shd_growy_append_formatted(g, "\tmemset((void*) &node, 0, sizeof(Node));\n"); | ||
shd_growy_append_formatted(g, "\tnode = (Node) {\n"); | ||
shd_growy_append_formatted(g, "\t\t.arena = arena,\n"); | ||
shd_growy_append_formatted(g, "\t\t.tag = %s_TAG,\n", name); | ||
shd_growy_append_formatted(g, "\tnode.arena = arena;\n"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the purpose of this change ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The project I'm using it in is compiling with C++20 which throws an error if not all fields are included in such an initializer list statement. It seems to only trigger in the generated code and I figured it was easier to simply use a syntax that causes less friction between different compilers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. I've been doing a lot of deep refactoring work, and I've not looked at windows builds in a hot second. The C++ header inclusion issue is something I'll try to keep in mind! |
||
shd_growy_append_formatted(g, "\tnode.tag = %s_TAG;\n", name); | ||
if (ops) | ||
shd_growy_append_formatted(g, "\t\t.payload.%s = payload,\n", snake_name); | ||
shd_growy_append_formatted(g, "\t\t.type = NULL,\n"); | ||
shd_growy_append_formatted(g, "\t};\n"); | ||
shd_growy_append_formatted(g, "\tnode.payload.%s = payload;\n", snake_name); | ||
shd_growy_append_formatted(g, "\tnode.type = NULL;\n"); | ||
shd_growy_append_formatted(g, "\treturn _shd_create_node_helper(arena, node, NULL);\n"); | ||
shd_growy_append_formatted(g, "}\n"); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was kind of quite lucky. The compilation of the framework failed for Windows because the compiler couldn't estimate the exact size of a single
const void
element in this line. So I was able to find this.