LLVM Techniques, Tips, and Best Practices Clang and Middle-End Libraries by Min-Yih Hsu

LLVM Techniques, Tips, and Best Practices Clang and Middle-End Libraries by Min-Yih Hsu

Author:Min-Yih Hsu
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2021-01-22T00:00:00+00:00


Creating the toolchain and adding a custom include path

In this section, we are going to create the skeleton for our Zipline toolchain and show you how to add an extra include folder path – more specifically, an extra system include path – to the compilation stage within Zipline. Here are the detailed steps:

Before we add a real toolchain implementation, don't forget that we are going to use a custom driver flag, -zipline/--zipline, to enable our toolchain. Let's use the same skill we learned in the previous section, Adding custom driver flags, to do that. Inside clang/include/clang/Driver/Options.td, we will add the following lines:// zipline toolchain

def zipline : Flag<["-", "--"], "zipline">,

Flags<[NoXarchOption]>;

Again, Flag tells us this is a boolean flag and NoXarchOption tells us that this flag is driver-only. We will use this driver flag shortly.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.