Book Image

Getting started with LLVM core libraries

Book Image

Getting started with LLVM core libraries

Overview of this book

Table of Contents (17 chapters)
Getting Started with LLVM Core Libraries
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Cross-platform Compilation

Traditional compilers transform the source code into native executables. In this context, native means that it runs on the same platform of the compiler, and a platform is a combination of hardware, operating system, application binary interface (ABI), and system interface choices. These choices define a mechanism that the user-level program can use to communicate with the underlying system. Hence, if you use a compiler in your GNU/Linux x86 machine, it will generate executables that link with your system libraries and are tailored to run on this exact same platform.

Cross-platform compilation is the process of using a compiler to generate executables for different, non-native platforms. If you need to generate code that links with libraries different to the libraries of your own system, you can usually solve this by using specific compilation flags. However, if the target platform where you intend to deploy your executable is incompatible with your platform...