llvm-project/clang/lib/Driver
Weining Lu 15b65bcd65 [Clang][LoongArch] Add initial LoongArch target and driver support
With the initial support added, clang can compile `helloworld` C
to executable file for loongarch64. For example:

```
$ cat hello.c
int main() {
  printf("Hello, world!\n");
  return 0;
}
$ clang --target=loongarch64-unknown-linux-gnu --gcc-toolchain=xxx --sysroot=xxx hello.c
```

The output a.out can run within qemu or native machine. For example:

```
$ file ./a.out
./a.out: ELF 64-bit LSB pie executable, LoongArch, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-loongarch-lp64d.so.1, for GNU/Linux 5.19.0, with debug_info, not stripped
$ ./a.out
Hello, world!
```

Currently gcc toolchain and sysroot can be found here:
https://github.com/loongson/build-tools/releases/download/2022.08.11/loongarch64-clfs-5.1-cross-tools-gcc-glibc.tar.xz

Reference: https://github.com/loongson/LoongArch-Documentation
The last commit hash (main branch) is:
99016636af64d02dee05e39974d4c1e55875c45b

Note loongarch32 is not fully tested because there is no reference
gcc toolchain yet.

Differential Revision: https://reviews.llvm.org/D130255
2022-08-23 13:47:22 +08:00
..
ToolChains [Clang][LoongArch] Add initial LoongArch target and driver support 2022-08-23 13:47:22 +08:00
Action.cpp [Clang] Introduce clang-offload-packager tool to bundle device files 2022-05-11 09:39:13 -04:00
CMakeLists.txt [Clang][LoongArch] Add initial LoongArch target and driver support 2022-08-23 13:47:22 +08:00
Compilation.cpp Use range-based for loops (NFC) 2022-08-20 21:18:32 -07:00
Distro.cpp Add support of the next Ubuntu (Ubuntu 22.10 - Kinetic Kudu) 2022-05-23 13:49:34 +02:00
Driver.cpp [clang][lldb][cmake] Use new `*_INSTALL_LIBDIR_BASENAME` CPP macro 2022-08-20 12:52:21 -04:00
DriverOptions.cpp
Job.cpp [Clang] Own the CommandLineArgs in CodeGenOptions 2021-12-21 17:41:35 -05:00
Multilib.cpp Use the range-based overload of llvm::sort where possible 2022-07-23 15:13:25 +02:00
OffloadBundler.cpp OffloadBundler.cpp - fix Wdocumentation warnings. NFC. 2022-08-01 15:24:47 +01:00
OptionUtils.cpp
Phases.cpp
SanitizerArgs.cpp [ubsan] Using metadata instead of prologue data for function sanitizer 2022-06-27 12:09:13 -07:00
Tool.cpp [clang][driver] NFC: Move InputInfo.h from lib to include 2021-07-27 09:17:39 +02:00
ToolChain.cpp Use range-based for loops (NFC) 2022-08-20 21:18:32 -07:00
Types.cpp [flang][driver] Add support for consuming LLVM IR/BC files 2022-05-05 15:11:50 +00:00
XRayArgs.cpp [Driver] Remove Separate form for XRay options 2022-08-02 00:47:37 -07:00