From ba85b8d02448f8057440b1298b842e333f33d1cd Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 23 Apr 2020 22:39:52 +0300 Subject: [PATCH] Revert "compiler: support setting pref.output_cross_c with -os cross" This is reverted until cmd/tools/gen_vc.v starts passing `-os cross` again, or until https://github.com/vlang/vc/pull/12 is merged. This reverts commit 878be4d8861bccdfd275d26feb71a31ef869ad97. --- cmd/v/v.v | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/v/v.v b/cmd/v/v.v index 1dcb73c0df..48c9d671a2 100644 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -170,17 +170,14 @@ fn parse_args(args []string) (&pref.Preferences, string) { res.backend = .x64 } '-os' { + // TODO Remove `tmp` variable when it doesn't error out in C. target_os := cmdline.option(current_args, '-os', '') - i++ - target_os_kind := pref.os_from_string(target_os) or { - if target_os == 'cross' { - res.output_cross_c = true - continue - } + tmp := pref.os_from_string(target_os) or { println('unknown operating system target `$target_os`') exit(1) } - res.os = target_os_kind + res.os = tmp + i++ } '-cflags' { res.cflags = cmdline.option(current_args, '-cflags', '')