https://github.com/SixWeining approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -19,13 +23,16 @@
// CHECK-NOT: "--build-id"
// CHECK: "--hash-style=both"
// CHECK: "-pie"
-// CHECK: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
+// CHECK-ARM: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
Ami-zhang wrote:
Yes, it dose.
https://github.com/llvm
https://github.com/Ami-zhang updated
https://github.com/llvm/llvm-project/pull/127555
>From 49312a2cd5d1b6ab59f92571a925cfaeb0cf9eb3 Mon Sep 17 00:00:00 2001
From: Ami-zhang
Date: Tue, 25 Feb 2025 11:28:36 +0800
Subject: [PATCH] [clang][LoongArch] Add OHOS target
Add support for OHOS on loonga
@@ -19,13 +23,16 @@
// CHECK-NOT: "--build-id"
// CHECK: "--hash-style=both"
// CHECK: "-pie"
-// CHECK: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
+// CHECK-ARM: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
SixWeining wrote:
Does `ARM-A7-SOFT ` also need this che
Ami-zhang wrote:
Ping
Does anyone have any further comments?:)
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SixWeining wrote:
> > Could you add some tests in ohos.c with the `--sysroot` option specified?
>
> Could I confirm what the test targeting the `--sysroot` option is for? Is it
> also intended to test the `page-size`?
I mean the purpose is to check whether clang driver passes correct options t
Ami-zhang wrote:
> Could you add some tests in ohos.c with the `--sysroot` option specified?
Could I confirm what the test targeting the `--sysroot` option is for? Is it
also intended to test the `page-size`?
https://github.com/llvm/llvm-project/pull/127555
@@ -235,3 +235,24 @@
// CHECK-OHOS-PTHREAD-NOT: -lpthread
+// RUN: %clang -### --target=aarch64-linux-ohos %s 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK-MAXPAGESIZE-4KB %s
+// RUN: %clang -### --target=aarch64-none-linux-gnu %s 2>&1 | \
+// RUN: FileCheck --check-pr
@@ -235,3 +235,24 @@
// CHECK-OHOS-PTHREAD-NOT: -lpthread
+// RUN: %clang -### --target=aarch64-linux-ohos %s 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK-MAXPAGESIZE-4KB %s
+// RUN: %clang -### --target=aarch64-none-linux-gnu %s 2>&1 | \
+// RUN: FileCheck --check-pr
SixWeining wrote:
Could you add some tests in ohos.c with the `--sysroot` option specified?
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
@@ -235,3 +235,24 @@
// CHECK-OHOS-PTHREAD-NOT: -lpthread
+// RUN: %clang -### --target=aarch64-linux-ohos %s 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK-MAXPAGESIZE-4KB %s
+// RUN: %clang -### --target=aarch64-none-linux-gnu %s 2>&1 | \
+// RUN: FileCheck --check-pr
@@ -0,0 +1,16 @@
+/// Check the max-page-size for OHOS aarch64/loongarch64/riscv64/x86_64.
Ami-zhang wrote:
Removed the new file and added the page-size check in ohos.c, following the
style of similar tests. Thanks!
https://github.com/llvm/llvm-project/pull/127
https://github.com/Ami-zhang updated
https://github.com/llvm/llvm-project/pull/127555
>From e675b4b7848a300c695948b87aea15b6d4e77426 Mon Sep 17 00:00:00 2001
From: Ami-zhang
Date: Tue, 18 Feb 2025 10:00:25 +0800
Subject: [PATCH] [clang][LoongArch] Add OHOS target
Add support for OHOS on loonga
@@ -0,0 +1,16 @@
+/// Check the max-page-size for OHOS aarch64/loongarch64/riscv64/x86_64.
MaskRay wrote:
Don't add a new file for a minor property (though important to test) like
page-size. Just reuse ohos.c
Many driver tests are probably not organized in the
kpdev wrote:
> LGTM for the LoongArch change. We'll see if @kpdev has any objections later.
LGTM also. Thank you for the patch
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
https://github.com/Ami-zhang updated
https://github.com/llvm/llvm-project/pull/127555
>From 65d913fbd7adc2001aadadadeab93c188445cd79 Mon Sep 17 00:00:00 2001
From: Ami-zhang
Date: Tue, 18 Feb 2025 10:00:25 +0800
Subject: [PATCH] [clang][LoongArch] Add OHOS target
Add support for OHOS on loonga
@@ -0,0 +1,6 @@
+/// Check the max-page-size for OHOS LoongArch.
Ami-zhang wrote:
Okay.
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
@@ -0,0 +1,6 @@
+/// Check the max-page-size for OHOS LoongArch.
brad0 wrote:
I'd rename the test like ohos-pagesize.c. Maybe add one other arch and check
that the value is 4k.
https://github.com/llvm/llvm-project/pull/127555
___
@@ -368,7 +370,9 @@ void OHOS::addExtraOpts(llvm::opt::ArgStringList &CmdArgs)
const {
CmdArgs.push_back("-z");
CmdArgs.push_back("relro");
CmdArgs.push_back("-z");
- CmdArgs.push_back("max-page-size=4096");
+ CmdArgs.push_back(getArch() == llvm::Triple::loongarch64
--
https://github.com/Ami-zhang updated
https://github.com/llvm/llvm-project/pull/127555
>From 5a2d1eb3366a3859d615a97191c94a33aae3355e Mon Sep 17 00:00:00 2001
From: Ami-zhang
Date: Tue, 18 Feb 2025 10:00:25 +0800
Subject: [PATCH] [clang][LoongArch] Add OHOS target
Add support for OHOS on loonga
https://github.com/Ami-zhang updated
https://github.com/llvm/llvm-project/pull/127555
>From c6df3aa9b9769d096d2cd63fc2353665ec9edbd1 Mon Sep 17 00:00:00 2001
From: Ami-zhang
Date: Tue, 18 Feb 2025 10:00:25 +0800
Subject: [PATCH] [clang][LoongArch] Add OHOS target
Add support for OHOS on loonga
@@ -741,16 +741,28 @@ std::unique_ptr AllocateTarget(const
llvm::Triple &Triple,
case llvm::Triple::loongarch32:
switch (os) {
case llvm::Triple::Linux:
- return std::make_unique>(Triple,
- Opt
@@ -2458,7 +2458,8 @@ void
Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
static const char *const LoongArch64LibDirs[] = {"/lib64", "/lib"};
static const char *const LoongArch64Triples[] = {
- "loongarch64-linux-gnu", "loongarch64-unknown-linux-gnu"};
https://github.com/SixWeining commented:
I think you should add more tests like
`clang/test/Driver/loongarch-toolchain.c` and https://reviews.llvm.org/D55029.
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@li
https://github.com/SixWeining edited
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SixWeining commented:
LGTM for the LoongArch change. We'll see if @kpdev has any objections later.
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
https://github.com/SixWeining edited
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -368,7 +370,12 @@ void OHOS::addExtraOpts(llvm::opt::ArgStringList &CmdArgs)
const {
CmdArgs.push_back("-z");
CmdArgs.push_back("relro");
CmdArgs.push_back("-z");
- CmdArgs.push_back("max-page-size=4096");
+ // LoongArch needs page size 16K
SixWeini
@@ -368,7 +370,12 @@ void OHOS::addExtraOpts(llvm::opt::ArgStringList &CmdArgs)
const {
CmdArgs.push_back("-z");
CmdArgs.push_back("relro");
CmdArgs.push_back("-z");
- CmdArgs.push_back("max-page-size=4096");
+ // LoongArch needs page size 16K
+ if (getArch() == llvm:
https://github.com/Ami-zhang edited
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -111,6 +111,8 @@ std::string OHOS::getMultiarchTriple(const llvm::Triple &T)
const {
return "x86_64-linux-ohos";
case llvm::Triple::aarch64:
return "aarch64-linux-ohos";
+ case llvm::Triple::loongarch64:
Ami-zhang wrote:
Yeah.
Just on loongarch6
@@ -3,13 +3,15 @@
// RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=riscv64-linux-ohos <
/dev/null | FileCheck %s -match-full-lines -check-prefix=RISCV64-OHOS-CXX
// RUN: %clang_cc1 -x c++ -E -dM -ffreestanding -triple=mipsel-linux-ohos <
/dev/null | FileCheck %s -match-
@@ -111,6 +111,8 @@ std::string OHOS::getMultiarchTriple(const llvm::Triple &T)
const {
return "x86_64-linux-ohos";
case llvm::Triple::aarch64:
return "aarch64-linux-ohos";
+ case llvm::Triple::loongarch64:
brad0 wrote:
No loongarch32 addition here
brad0 wrote:
That looks better.
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Ami-zhang wrote:
> Remove all of the OHOS_LOCAL begin / end comment markers.
Done.
Thank you for your review.
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/Ami-zhang updated
https://github.com/llvm/llvm-project/pull/127555
>From daf1b4de8da9809c01147c9703e4ad83cc2e8231 Mon Sep 17 00:00:00 2001
From: Ami-zhang
Date: Tue, 18 Feb 2025 10:00:25 +0800
Subject: [PATCH] [clang][LoongArch] Add OHOS target
Add support for OHOS on LoongA
brad0 wrote:
You have to push any new changes first.
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
brad0 wrote:
Remove all of the OHOS_LOCAL comment markers.
https://github.com/llvm/llvm-project/pull/127555
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
@llvm/pr-subscribers-clang
Author: None (Ami-zhang)
Changes
Add support for OHOS on LoongArch.
This patch is taken from part of the
https://gitee.com/openharmony/third_party_llvm-project/pulls/554, the original
author is @caiwei.
---
Full
https://github.com/Ami-zhang created
https://github.com/llvm/llvm-project/pull/127555
Add support for OHOS on LoongArch.
This patch is taken from part of the
https://gitee.com/openharmony/third_party_llvm-project/pulls/554, the original
author is @caiwei.
>From e53bc2f03be0d2088f27e336167f74a
40 matches
Mail list logo