Merge: Global for filenames
authorJean Privat <jean@pryen.org>
Fri, 6 Feb 2015 01:14:25 +0000 (08:14 +0700)
committerJean Privat <jean@pryen.org>
Fri, 6 Feb 2015 01:14:25 +0000 (08:14 +0700)
commit606eedfeea5c44fc8e9625b46a206c035f9dab56
tree1affc09fb4d5aa25c49e2433afa75b90d358cacb
parente61c0afcb7cb09fe9542de355783a53c9ae0c46d
parent1109fda04bfd7583cf413a38e706baaf02fd9e2d
Merge: Global for filenames

This PR remove the remaining big variability for nitc when generating separate files: the path of nit module in runtime error messages.
When compiling a same module but from different current working directories, the relative path of the module changed. Thus causing unnecessary difference in the generated C source code that made ccache unhappy.

Before
~~~
$ ccache -C
$ time nitc src/nitc.nit
user 2m8.264s
$ cd src
$ time nitc nitc.nit
user 2m8.676s
~~~

After
~~~
$ ccache -C
$ time nitc src/nitc.nit
user 2m9.180s
$ cd src
$ time nitc nitc.nit
user 0m9.812s
~~~

Note: some files are still different after the PR

* main.c because it contains the real filepath
* c_function_hash.c same
* _ffi.? because the pragma lines indicate the original relative file

Note 2: `.nit_compile` directories are still created by default in the current directory and let unclean. cf #792

Pull-Request: #1144
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
src/loader.nit