aboutsummaryrefslogtreecommitdiff
path: root/src/build_settings.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-11-17 13:55:08 +0000
committergingerBill <bill@gingerbill.org>2020-11-17 13:55:08 +0000
commit00192bb349993dbdd02d13f31b51809bba4d875e (patch)
treeb6b32a2e519020e1c50f68ee4375ac7ea10bb3d1 /src/build_settings.cpp
parentedd9d5e50b8c976c32f7227e0dfef8ddb9443c40 (diff)
Improve flag handling to check for invalid uses
Diffstat (limited to 'src/build_settings.cpp')
-rw-r--r--src/build_settings.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index 3210c914c..8cd516505 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -104,6 +104,35 @@ enum BuildModeKind {
BuildMode_Assembly,
};
+enum CommandKind : u32 {
+ Command_run = 1<<0,
+ Command_build = 1<<1,
+ Command_check = 1<<3,
+ Command_query = 1<<4,
+ Command_doc = 1<<5,
+ Command_version = 1<<6,
+
+ Command__does_check = Command_run|Command_build|Command_check|Command_query|Command_doc,
+ Command__does_build = Command_run|Command_build,
+ Command_all = ~(u32)0,
+};
+
+char const *odin_command_strings[32] = {
+ "run",
+ "build",
+ "check",
+ "query",
+ "doc",
+ "version",
+};
+
+
+
+enum CmdDocFlag : u32 {
+ CmdDocFlag_All = 1<<0,
+};
+
+
// This stores the information for the specify architecture of this build
struct BuildContext {
@@ -124,6 +153,7 @@ struct BuildContext {
i64 word_size; // Size of a pointer, must be >= 4
i64 max_align; // max alignment, must be >= 1 (and typically >= word_size)
+ CommandKind command_kind;
String command;
TargetMetrics metrics;
@@ -167,6 +197,8 @@ struct BuildContext {
bool ignore_microsoft_magic;
bool linker_map_file;
+ u32 cmd_doc_flags;
+
QueryDataSetSettings query_data_set_settings;
gbAffinity affinity;