This change passes through C and assembler jobs to Movidius tools by generating commands which are the same as the ones produces by the sample Makefiles included in the SDK.
Rather than reference MV_TOOLS_DIR to find executable programs, we will assume that the tools are installed in the same place where the Clang driver would find its own tools.
Similarly, this change assume that -I options will "just work" in terms of finding files.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Inherit from Generic_GCC instead of ToolChain.
The Generic_GCC ctor appends getDriver().getInstalledDir() into getProgramPaths() which we need, and I see no downside to this.
I agree with Joerg about submitting the separate cleanup change separately (feel free to just pull it out and commit it).
More detailed comments below.
lib/Driver/ToolChains.h | ||
---|---|---|
875–877 ↗ | (On Diff #27680) | I'm not a huge fan of the "Movi" prefix. Maybe just "Movidius" or "SHAVE"? If this is only used for the shave-* triples, I'd probably go with SHAVE. I would also suffix it with ToolChain or something. It's not about Clang, its about the toolchain. (The use of 'GCC' here is because GCC actually ships a complete toolchain) |
895–896 ↗ | (On Diff #27680) | I suspect these should be named MoviCompile and MoviAsm. I would also probably call these "Compiler" and "Assembler" because I'm a bit of a pedant. ;] |
lib/Driver/Tools.h | ||
734–735 ↗ | (On Diff #27680) | Similar to the above, I'd probably call this SHAVE given that some of the ones above are XCore. |
lib/Driver/Driver.cpp | ||
---|---|---|
1572 ↗ | (On Diff #27684) | committed separately |
lib/Driver/ToolChains.cpp | ||
3748 ↗ | (On Diff #27684) | Seems these can be omitted. Since SHAVEToolChain inherits from Generic_GCC, it finds methods for isBlahDefault() and printVerboseInfo(). Is that OK? |
lib/Driver/ToolChains.h | ||
875–877 ↗ | (On Diff #27680) | SHAVEToolChain is fine with me. But Hexagon abbreviates to Hexagon_TC, and XCore uses no suffix. We should standardize on _TC or ToolChain. Which? |
895–896 ↗ | (On Diff #27680) | Sure, but it introduces gratuitous inconsistency. I also liked Compiler and Assembler except that Generic_GCC names its member variables 'Preprocess' and 'Compile' rather than 'Preprocessor' and 'Compiler'. And the method to make an instance of tool model is tools::gcc::Preprocess (respectively tools::gcc::Compile). Those are highly un-mnemonic. They really sound like they mean *do* that job, but what they mean is "give me a thing that does that job". And while we're on the subject, anything named someToolChain::Assemble::ConstructJob should be renamed to someToolChain::Assembler::ConstructJob, and the same for all other tools. |
lib/Driver/Tools.h | ||
734–735 ↗ | (On Diff #27680) | done |