aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-09-08 16:35:25 +0100
committergingerBill <bill@gingerbill.org>2022-09-08 16:35:25 +0100
commit81e3b64ecda857458b8e0762bdf6156cdaa1cb74 (patch)
tree3571e769475762f406af73f4aa3d4585276d28a8 /src/checker.cpp
parent39728b8bfbd15a82a3137b303bb58394342c2250 (diff)
Add `ODIN_BUILD_PROJECT_NAME` and `//+build-project-name`
This allows for condition inclusion of files, similar to `+build` or `ODIN_BUILD`, but relies on the directory name of the project to be the same as specified Example: odin build foo/bar/baz ODIN_BUILD_PROJECT_NAME == "baz" //+build_project_name baz
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index a7470a4c9..16e480786 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -938,6 +938,7 @@ void init_universal(void) {
add_global_string_constant("ODIN_VENDOR", bc->ODIN_VENDOR);
add_global_string_constant("ODIN_VERSION", bc->ODIN_VERSION);
add_global_string_constant("ODIN_ROOT", bc->ODIN_ROOT);
+ add_global_string_constant("ODIN_BUILD_PROJECT_NAME", bc->ODIN_BUILD_PROJECT_NAME);
{
GlobalEnumValue values[TargetOs_COUNT] = {