Implement the ShaveToolChain::buildLinker() method instead of calling llvm_unreachable.
Lightly tested, but works ok on a few of the sample applications.
Details
Diff Detail
Event Timeline
lib/Driver/Tools.cpp | ||
---|---|---|
9110 | Perhaps this should be a default plus a command-line argument, instead of an environment variable? | |
9144 | Doesn't seem right to hardcode this particular version. Using a default for ToolsRoot if MV_TOOLS_DIR isn't set sounds okay, but presumably should be done up above before the loop. | |
9160 | "-O9"? That seems weird, and is not actually a thing. | |
9198 | These (oneleon/bothleons) don't seem to do anything different than "rtems", so I'd remove them | |
9221 | Why are these building up explicit paths, instead of adding the proper -L search paths, and then -lc -lssp etc? |
lib/Driver/Tools.cpp | ||
---|---|---|
9110 | How about if '--sysdir' provides the value, falling back to the environment var, and then a fixed default? | |
9144 | I could see a couple ways around hardcoding a version - if neither --sysroot nor MV_TOOLS_DIR is used, then the path is arbitrary anyway, so doesn't need a versioned subdir. And arguably is sysroot is given, then it could be an already-versioned pathname. Otoh, detecting the version works fine in that case. For reference, the example sub-Makefile has hardcoded: | |
9160 | This was cargo-cultism. I've no objection to taking it out, but who's to say that their linker doesn't use it for something, as why else would they bother to put it in the examples? |
Perhaps this should be a default plus a command-line argument, instead of an environment variable?