diff options
author | Fangrui Song <i@maskray.me> | 2023-12-05 23:44:35 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-12-05 23:44:35 -0800 |
commit | 114325b86a3d0360afc772c44335fc9092686f58 (patch) | |
tree | 31d938f1b871823a496fe7c409f688a2eccd875e /llvm/docs/tutorial/MyFirstLanguageFrontend | |
parent | 7ca94a841c7c557191f278ab68f8358e5b9f6cee (diff) | |
download | llvm-114325b86a3d0360afc772c44335fc9092686f58.zip llvm-114325b86a3d0360afc772c44335fc9092686f58.tar.gz llvm-114325b86a3d0360afc772c44335fc9092686f58.tar.bz2 |
Kaleidoscope-Ch8: use Reloc::PIC_
which has better portability across different OSes.
In addition, on many ELF OSes, this output relocatable file can be
linked without -no-pie.
Diffstat (limited to 'llvm/docs/tutorial/MyFirstLanguageFrontend')
-rw-r--r-- | llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst index 33ee7d2..17bf8a4 100644 --- a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst +++ b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst @@ -105,8 +105,8 @@ To see which features and CPUs that LLVM knows about, we can use 3dnowa - Enable 3DNow! Athlon instructions. ... -For our example, we'll use the generic CPU without any additional -features, options or relocation model. +For our example, we'll use the generic CPU without any additional feature or +target option. .. code-block:: c++ @@ -114,8 +114,7 @@ features, options or relocation model. auto Features = ""; TargetOptions opt; - auto RM = std::optional<Reloc::Model>(); - auto TargetMachine = Target->createTargetMachine(TargetTriple, CPU, Features, opt, RM); + auto TargetMachine = Target->createTargetMachine(TargetTriple, CPU, Features, opt, Reloc::PIC_); Configuring the Module |