This is an archive of the discontinued LLVM Phabricator instance.

Haiku: add a test for haiku driver
Needs ReviewPublic

Authored by kallisti5 on Jul 18 2018, 6:57 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None

Diff Detail

Repository
rC Clang

Event Timeline

kallisti5 created this revision.Jul 18 2018, 6:57 AM
This comment was removed by kallisti5.
joerg added a subscriber: joerg.Jul 18 2018, 7:35 AM

It seems to miss most of the interesting checks, i.e. crt files. Compare with any of the entries on netbsd.c for example.

kallisti5 updated this revision to Diff 396674.Dec 30 2021, 7:43 AM

I've reworked these tests to be a lot more in-depth. Both c and c++ are passing. I plan on trying to get more of our clang / llvm patches upstream.. so this is the first step.

./bin/llvm-lit -asvv ../clang/test/Driver/haiku.c
llvm-lit: /home/kallisti5/Code/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: using clang: /home/kallisti5/Code/llvm-project/build/bin/clang
PASS: Clang :: Driver/haiku.c (1 of 1)
Script:
--
: 'RUN: at line 1';   /home/kallisti5/Code/llvm-project/build/bin/clang -no-canonical-prefixes -target x86_64-unknown-haiku  --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c -### 2>&1  | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-X86_64 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c
: 'RUN: at line 4';   /home/kallisti5/Code/llvm-project/build/bin/clang -no-canonical-prefixes -target i586-pc-haiku  --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c -### 2>&1  | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-X86 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c
: 'RUN: at line 7';   /home/kallisti5/Code/llvm-project/build/bin/clang -no-canonical-prefixes -target riscv64-unknown-haiku  --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c -### 2>&1  | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-RV64 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c
--
Exit Code: 0


********************

Testing Time: 0.07s
  Passed: 1
./bin/llvm-lit -asvv ../clang/test/Driver/haiku.cpp
llvm-lit: /home/kallisti5/Code/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: using clang: /home/kallisti5/Code/llvm-project/build/bin/clang
PASS: Clang :: Driver/haiku.cpp (1 of 1)
Script:
--
: 'RUN: at line 1';   /home/kallisti5/Code/llvm-project/build/bin/clang --driver-mode=g++ -no-canonical-prefixes -target i586-pc-haiku  --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp -### -stdlib=platform 2>&1  | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-X86 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp
: 'RUN: at line 4';   /home/kallisti5/Code/llvm-project/build/bin/clang --driver-mode=g++ -no-canonical-prefixes -target x86_64-unknown-haiku  --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp -### -stdlib=platform 2>&1  | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-X86_64 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp
: 'RUN: at line 7';   /home/kallisti5/Code/llvm-project/build/bin/clang --driver-mode=g++ -no-canonical-prefixes -target riscv64-unknown-haiku  --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp -### -stdlib=platform 2>&1  | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-RV64 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp
--
Exit Code: 0


********************

Testing Time: 0.06s
  Passed: 1
Herald added a project: Restricted Project. · View Herald TranscriptDec 30 2021, 7:43 AM

I should mention that there are no crt checks since the Haiku toolchain driver doesn't actually look for our crt's yet.

https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Haiku.cpp
vs
https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/NetBSD.cpp#L239

With the change above though (adding basic_haiku_tree) i'm preparing for that in a future commit after our port is better up-streamed.

brad added a subscriber: brad.Mon, Nov 27, 12:57 PM

This can be closed.

Herald added a project: Restricted Project. · View Herald TranscriptMon, Nov 27, 12:57 PM
Herald added subscribers: wangpc, asb. · View Herald Transcript