You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration in /etc/nim/nim.cfg file on Ubuntu 18.04 is not read and taken into account. If C compiler is set to clang, Nim compiler ignores it still uses GCC. The same setting in ~/.config/nim/nim.cfg works without problems.
Steps to reproduce
Install using choosenim script curl https://nim-lang.org/choosenim/init.sh -sSf | sh
Create /etc/nim/nim.cfg and make it readable to all users
Modify its content to cc = clang
Compile Nim file for example nim c fiddle.nim
See "Command for C compiler" comment in cache folder, for example cat ~/.cache/nim/fiddle_d/fiddle.nim.c
Expected Output
/* Generated by Nim Compiler v1.0.0 */
/* (c) 2019 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, amd64, clang */
/* Command for C compiler:
clang -c -w -I/home/asmar/.choosenim/toolchains/nim-1.0.0/lib -I/home/asmar/projects/nim/fiddle -o /home/asmar/.cache/nim/fiddle_d/fiddle.nim.c.o /home/asmar/.cache/nim/fiddle_d/fiddle.nim.c */
...
Additional Information
$ nim -v
Nim Compiler Version 1.0.0 [Linux: amd64]
Compiled at 2019-09-23
Copyright (c) 2006-2019 by Andreas Rumpf
git hash: f7a8fc46c0012033917582eb740dc0343c093e35
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
Configuration in
/etc/nim/nim.cfg
file on Ubuntu 18.04 is not read and taken into account. If C compiler is set toclang
, Nim compiler ignores it still uses GCC. The same setting in~/.config/nim/nim.cfg
works without problems.Steps to reproduce
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
/etc/nim/nim.cfg
and make it readable to all userscc = clang
nim c fiddle.nim
cat ~/.cache/nim/fiddle_d/fiddle.nim.c
Expected Output
Additional Information
The text was updated successfully, but these errors were encountered: