llvm-project/clang/test
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
..
APINotes
ARCMT
AST [clang][Interp] Implement inv and neg unary operations 2022-08-19 16:05:00 +02:00
ASTMerge
Analysis [analyzer] Handling non-POD multidimensional arrays in ArrayInitLoopExpr 2022-08-22 13:53:53 +02:00
C Update the status of some more C99 features 2022-08-17 08:11:56 -04:00
CXX Revert "Re-apply "Deferred Concept Instantiation Implementation""" 2022-08-19 12:47:34 -07:00
ClangScanDeps [clang][deps] Allow switching between lazily/eagerly loaded PCMs 2022-08-22 18:22:27 -07:00
CodeCompletion [clang] Apply FixIts to members declared via `using` in derived classes 2022-08-17 10:09:48 +02:00
CodeGen [clang][RISCV] Fix incorrect ABI lowering for inherited structs under hard-float ABIs 2022-08-19 20:31:06 +01:00
CodeGenCUDA [CUDA][FIX] Make shfl[_sync] for unsigned long long non-recursive 2022-07-21 12:36:54 -05:00
CodeGenCUDASPIRV [CUDA/SPIR-V] Force passing aggregate type byval 2022-07-22 20:30:15 +00:00
CodeGenCXX [clang][libcxx] renames `__remove_reference` 2022-08-22 23:15:10 +00:00
CodeGenCoroutines [PowerPC][Coroutines] Add tail-call check with call information for coroutines 2022-08-21 22:20:40 -04:00
CodeGenHIP Revert "Revert "[Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values"" 2022-07-29 19:07:07 +00:00
CodeGenHLSL [NFC] Rename dx.shader to hlsl.shader 2022-08-22 16:03:40 -05:00
CodeGenObjC Fix crash in ObjC codegen introduced with 5ab6ee7599 2022-07-24 13:59:45 +01:00
CodeGenObjCXX [WinEH] Apply funclet operand bundles to nounwind intrinsics that lower to function calls in the course of IR transforms 2022-07-26 17:52:43 +02:00
CodeGenOpenCL [AMDGPU] Add builtin s_sendmsg_rtn 2022-08-22 18:29:23 -04:00
CodeGenOpenCLCXX
CodeGenSYCL
Coverage
CoverageMapping
Driver [Clang][LoongArch] Add initial LoongArch target and driver support 2022-08-23 13:47:22 +08:00
ExtractAPI [clang][ExtractAPI] Record availability information on all platforms 2022-08-19 14:54:52 -07:00
FixIt [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
Format [clang-format] Fix an assertion failure on -lines=0:n 2022-07-08 23:41:16 -07:00
Frontend [AMDGPU] Add remarks to output some resource usage 2022-07-15 11:01:53 -07:00
Headers [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++" 2022-08-16 09:27:18 -04:00
Import
Index [clang][index] Index unresolved member expression as reference 2022-08-19 19:02:42 +03:00
Integration
InterfaceStubs
Interpreter Handles failing driver tests of clang 2022-08-02 12:29:26 +05:30
Layout [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
Lexer [clang][sema] Print more information about failed static assertions 2022-08-11 08:44:38 +02:00
LibClang
Misc [RISCV] Change how mtune aliases are implemented. 2022-08-18 16:22:25 -07:00
Modules [C++20][Modules] Improve handing of Private Module Fragment diagnostics. 2022-08-21 10:19:46 +01:00
OpenMP [OMPIRBuilder] Add support for safelen clause 2022-08-18 15:43:08 -04:00
PCH [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++" 2022-08-16 09:27:18 -04:00
Parser [clang][sema] Print more information about failed static assertions 2022-08-11 08:44:38 +02:00
ParserHLSL
ParserSYCL
Preprocessor [Clang][LoongArch] Add initial LoongArch target and driver support 2022-08-23 13:47:22 +08:00
Profile
Refactor
Rewriter Fix -Wbitfield-constant-conversion on 1-bit signed bitfield 2022-08-09 11:43:50 -04:00
Sema Missing tautological compare warnings due to unary operators 2022-08-19 10:46:29 -04:00
SemaCUDA
SemaCXX [clang][libcxx] renames `__remove_reference` 2022-08-22 23:15:10 +00:00
SemaHLSL [HLSL] Support -E option for HLSL. 2022-08-04 16:54:19 -07:00
SemaObjC Default implicit function pointer conversions diagnostic to be an error 2022-08-10 13:54:17 -04:00
SemaObjCXX [Sema][ObjC] Don't warn about implicitly-retained self in an unevaluated 2022-08-22 12:16:37 -07:00
SemaOpenCL [AMDGPU] Add builtin s_sendmsg_rtn 2022-08-22 18:29:23 -04:00
SemaOpenCLCXX
SemaSYCL [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
SemaTemplate Revert "Re-apply "Deferred Concept Instantiation Implementation""" 2022-08-19 12:47:34 -07:00
TableGen
Templight
Tooling Revert "[clang-diff] Fix assertion error when dealing with wide strings" 2022-06-07 14:58:10 -07:00
Unit [test] Propagate HWASAN_OPTIONS 2022-08-17 18:59:49 -07:00
VFS [clang][modules] Don't depend on sharing FileManager during module build 2022-08-05 12:24:40 -07:00
clang-rename
utils/update_cc_test_checks Disable update_cc_test_checks.py tests in stand-alone builds 2022-08-11 20:53:37 -07:00
.clang-format Disable clang-format entirely for test directories 2022-07-08 07:34:18 -04:00
CMakeLists.txt Disable update_cc_test_checks.py tests in stand-alone builds 2022-08-11 20:53:37 -07:00
TestRunner.sh
lit.cfg.py [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++" 2022-08-16 09:27:18 -04:00
lit.site.cfg.py.in Disable update_cc_test_checks.py tests in stand-alone builds 2022-08-11 20:53:37 -07:00