24.22.9.4. Why are all C++ symlinked into the gem5 build dir?
Upstream request: https://gem5.atlassian.net/browse/GEM5-469
Some scons madness.
https://scons.org/doc/2.4.1/HTML/scons-user.html#idp1378838508 generates hard links by default.
Then the a5bc2291391b0497fdc60fdc960e07bcecebfb8f SConstruct use symlinks in a futile attempt to make things better for editors or build systems from the past century.
It was not possible to disable the symlinks automatically for the entire project when I last asked: https://stackoverflow.com/questions/53656787/how-to-set-disable-duplicate-0-for-all-scons-build-variants-without-repeating-th
The horrendous downsides of this are:
-
it is basically impossible to setup an IDE properly with gem5: gem5 Eclipse configuration
-
It is likely preventing ccache hits when building to different output paths, because it makes the
-I
includes point to different paths. This is especially important for gem5 Ruby build, which could have the exact same source files as the non-Ruby builds: https://stackoverflow.com/questions/60340271/can-ccache-handle-symlinks-to-the-same-input-source-file-as-hits -
when debugging the emulator, it shows you directories inside the build directory rather than in the source tree
-
it is harder to separate which files are generated and which are in-tree when grepping for code generated definitions