diff options
| author | gingerBill <bill@gingerbill.org> | 2022-02-18 16:05:26 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-02-18 16:05:26 +0000 |
| commit | 454c92dc64b43934062a661c6e05ea4168b1b78e (patch) | |
| tree | ca5c6f11cb133aae3dd3d514e81820a6b2658ac7 /src/check_builtin.cpp | |
| parent | 7e33a86d5433eac2b0182c49d90d0f762e74c2ea (diff) | |
Allow objc intrinsics within `odin check` and `odin docs` but disallow for `odin build`
Diffstat (limited to 'src/check_builtin.cpp')
| -rw-r--r-- | src/check_builtin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index fb7a6efce..c6b7de506 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -248,7 +248,8 @@ bool check_builtin_objc_procedure(CheckerContext *c, Operand *operand, Ast *call String builtin_name = builtin_procs[id].name; if (build_context.metrics.os != TargetOs_darwin) { - if (!build_context.generate_docs) { // allow on doc generation (e.g. Metal stuff) + // allow on doc generation (e.g. Metal stuff) + if (!build_context.command_kind == Command_doc && !builtin_name.command_kind == Command_check) { error(call, "'%.*s' only works on darwin", LIT(builtin_name)); } } |