Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
98a72ab3
Commit
98a72ab3
authored
Apr 10, 2025
by
zhangyue
Browse files
issue/111: 修改 kunlun xmake 支持自动获取机器架构
parent
650f3057
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
xmake/kunlun.lua
xmake/kunlun.lua
+6
-3
No files found.
xmake/kunlun.lua
View file @
98a72ab3
...
@@ -20,14 +20,17 @@ rule("xpu")
...
@@ -20,14 +20,17 @@ rule("xpu")
local
objectfile
=
target
:
objectfile
(
sourcefile
)
local
objectfile
=
target
:
objectfile
(
sourcefile
)
local
basename
=
objectfile
:
gsub
(
"%.o$"
,
""
)
local
basename
=
objectfile
:
gsub
(
"%.o$"
,
""
)
os
.
mkdir
(
path
.
directory
(
objectfile
))
os
.
mkdir
(
path
.
directory
(
objectfile
))
local
cc
=
path
.
join
(
XTDK_DIR
,
"bin/clang++"
)
local
cc
=
path
.
join
(
XTDK_DIR
,
"bin/clang++"
)
local
includedirs
=
table.concat
(
target
:
get
(
"includedirs"
),
" "
)
local
includedirs
=
table.concat
(
target
:
get
(
"includedirs"
),
" "
)
local
arch_map
=
{
[
"x86_64"
]
=
"x86_64-linux-gnu"
,
[
"arm64"
]
=
"aarch64-linux-gnu"
}
local
args
=
{
local
args
=
{
"--sysroot=/"
,
"--sysroot=/"
,
"--target=
aarch64-linux-gnu"
,
"--target=
"
..
arch_map
[
os
.
arch
()]
,
"-fPIC"
,
"-fPIC"
,
"-pie"
,
"-pie"
,
"--xpu-arch=xpu2"
,
"--xpu-arch=xpu2"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment