00:37:45 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
00:38:06 | * | Jhonny2x4 joined #nim |
03:09:57 | * | rockcavera quit (Remote host closed the connection) |
03:31:12 | FromDiscord | <lainlaylie> In reply to @starkiller1493 "because I'm trying to": you can put your modules anywhere as long as your `--path`s are correct |
04:02:00 | FromDiscord | <heysokam> Is there a way to pass an argument to the internal compiler that nim calls?↵Meaning: I want to call `gcc thing myfile.output.c` when I say `nim myfile.nim --passC=thing` |
04:11:29 | * | fallback quit (Ping timeout: 260 seconds) |
04:22:21 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=nJSrvSnz |
04:22:39 | FromDiscord | <heysokam> `error: unknown command: -c` |
04:26:25 | * | fallback joined #nim |
04:37:47 | FromDiscord | <janakali> sent a code paste, see https://play.nim-lang.org/#pasty=KOsaXagQ |
04:38:39 | FromDiscord | <heysokam> In reply to @janakali "you can use a": that was not the question |
04:39:15 | FromDiscord | <heysokam> the question is passing an argument literally to the internal compiler, without nim f'ing with it |
04:45:14 | FromDiscord | <janakali> you can generate compile script and modify arguments directly:↵`nim c --compileOnly --genScript --nimcache:nimcache source.nim`↵then edit `nimcache/compile_source.sh` however you need |
04:46:52 | FromDiscord | <heysokam> ? |
04:49:01 | FromDiscord | <heysokam> oh, I just read the docs about that option. I guess that's one way. but that's so complex |
04:49:44 | FromDiscord | <heysokam> I'd rather recompile a wrapper binary everytime I compile my app, than export the script and modify it |
04:50:50 | FromDiscord | <heysokam> To answer my own question, it seems that the conclusion is: No, nim options are badly managed |
04:51:22 | FromDiscord | <heysokam> or badly forwarded to the internal compiler, rather |
05:15:56 | FromDiscord | <janakali> In reply to @heysokam "or badly forwarded to": I wouldn't say it's badly forwarded, nim just doesn't support every C compiler, only a few. Default one is gcc and it happens that gcc/clang require '-c' as first argument so it's hard-coded in the gcc/clang command gen part of the compiler: https://github.com/nim-lang/Nim/blob/d15705e05b166077634a6caa96808d34af1f5d5b/compiler/extccomp.nim#L83 |
05:20:03 | FromDiscord | <heysokam> In reply to @janakali "I wouldn't say it's": you literally gave the counter argument with solid reasons to your own statement 😦 |
05:21:44 | FromDiscord | <janakali> where? I just said that if you want to support non-standard compilers, you need to add support properly e.g. edit extccomp.nim and recompile Nim |
05:21:48 | FromDiscord | <heysokam> hard-coding a first argument, without allowing customization of it, is "badly" enough to be called badly |
05:22:44 | FromDiscord | <janakali> hard-coded for gcc/clang where it's literally required isn't so bad |
05:23:00 | FromDiscord | <heysokam> its required in `zig cc` too |
05:23:19 | FromDiscord | <janakali> zig cc is not supported |
05:23:30 | FromDiscord | <heysokam> but nim says `zig -c` if I give it `zig cc`, and complains that `"zig cc"` is not a valid path |
05:23:32 | FromDiscord | <janakali> officially atleast |
05:24:11 | FromDiscord | <heysokam> well, that was the question, which would be answered if nim did a not-bad job at dealing with compiler arguments |
05:24:36 | FromDiscord | <heysokam> because I would configure it, and not need to hack together the compiler and re-bootstrap |
05:24:43 | FromDiscord | <heysokam> that warrants the badly title |
05:25:19 | FromDiscord | <heysokam> anyway, lets stop wasting our breath on this. ty jan |
05:32:09 | FromDiscord | <lainlaylie> nice thing about open source is you can implement the features you want and PR them |
05:42:36 | FromDiscord | <heysokam> this one in particular was implemented and removed on purpose (saw the PR myself)↵But I thought I could be missing some hidden magic option, so figured I could ask |
05:43:50 | FromDiscord | <heysokam> last time I implemented a hack to get by, but I want to do things better this time |
05:49:26 | FromDiscord | <lainlaylie> are you referring to https://github.com/nim-lang/Nim/pull/14245 |