or did you run it from inside another Emacs session?
No.
Also, does the same command succeed if you run it from the Bash
command line? Does it succeed if you run it from the cmd.exe command
line?
No, has nothing to do with it.
I've got something amazing/phenomenal here. Read carefully. With "-g -O0" it can reserve memory just fine and everything builds successfully. With "-O3" it fails with the first try, i.e. with the size of 0x68000000 and the corresponding error is:
ERROR_NOT_ENOUGH_MEMORY
8 (0x8)
Not enough storage is available to process this command.
Since with "-g -O0" it succeeds, it cannot be debugged with GDB. For "-O3" I used simple `printf' testing.
I can test "-O2" if you are interested.
What does it smell like? A toolchain bug?