summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-12-18 09:29:15 +0100
committerGitHub <noreply@github.com>2018-12-18 09:29:15 +0100
commitd7d17d5ab09395f36785112286f1dc28ff02a261 (patch)
tree20fcdfb696e02296621f13e6baa9eeb996d31629
parentdd5812546f8a3dd2e65fd65ee3c786614cebc5f1 (diff)
parent09b9a544187f9ab72da675fc80a5c815c0a6535c (diff)
downloadNim-d7d17d5ab09395f36785112286f1dc28ff02a261.tar.gz
see what breaks with a global config.nims (#10016)
* see what breaks with a global config.nims

* make tests green with a global config.nims file
-rw-r--r--compiler/commands.nim6
-rw-r--r--config/config.nims1
-rw-r--r--lib/system/ansi_c.nim2
3 files changed, 6 insertions, 3 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index b090a09a5..5893791cc 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -590,10 +590,12 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
     processOnOffSwitchG(conf, {optGenIndex}, arg, pass, info)
   of "import":
     expectArg(conf, switch, arg, pass, info)
-    if pass in {passCmd2, passPP}: conf.implicitImports.add arg
+    if pass in {passCmd2, passPP}:
+      conf.implicitImports.add findModule(conf, arg, toFullPath(conf, info)).string
   of "include":
     expectArg(conf, switch, arg, pass, info)
-    if pass in {passCmd2, passPP}: conf.implicitIncludes.add arg
+    if pass in {passCmd2, passPP}:
+      conf.implicitIncludes.add findModule(conf, arg, toFullPath(conf, info)).string
   of "listcmd":
     expectNoArg(conf, switch, arg, pass, info)
     incl(conf.globalOptions, optListCmd)
diff --git a/config/config.nims b/config/config.nims
new file mode 100644
index 000000000..3f0d9e1b8
--- /dev/null
+++ b/config/config.nims
@@ -0,0 +1 @@
+# empty config.nims to prevent future regressions, see #9990
diff --git a/lib/system/ansi_c.nim b/lib/system/ansi_c.nim
index 38910dbd6..af34060d8 100644
--- a/lib/system/ansi_c.nim
+++ b/lib/system/ansi_c.nim
@@ -51,7 +51,7 @@ when defined(windows):
 elif defined(macosx) or defined(linux) or defined(freebsd) or
      defined(openbsd) or defined(netbsd) or defined(solaris) or
      defined(dragonfly) or defined(nintendoswitch) or defined(genode) or
-     defined(aix):
+     defined(aix) or hostOS == "standalone":
   const
     SIGABRT = cint(6)
     SIGFPE = cint(8)