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
9daba5b8
Unverified
Commit
9daba5b8
authored
Mar 26, 2025
by
PanZezhong1725
Committed by
GitHub
Mar 26, 2025
Browse files
Merge pull request #124 from PanZezhong1725/issue/123
issue/123 修复昇腾平台编译utils缺少fpic选项问题
parents
c0d94151
0e8d81d0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
xmake.lua
xmake.lua
+16
-1
xmake/cpu.lua
xmake/cpu.lua
+2
-2
No files found.
xmake.lua
View file @
9daba5b8
...
@@ -120,8 +120,23 @@ target("infini-utils")
...
@@ -120,8 +120,23 @@ target("infini-utils")
set_kind
(
"static"
)
set_kind
(
"static"
)
on_install
(
function
(
target
)
end
)
on_install
(
function
(
target
)
end
)
set_languages
(
"cxx17"
)
set_languages
(
"cxx17"
)
set_warnings
(
"all"
,
"error"
)
if
is_plat
(
"windows"
)
then
add_cxflags
(
"/wd4068"
)
if
has_config
(
"omp"
)
then
add_cxflags
(
"/openmp"
)
end
else
add_cxflags
(
"-fPIC"
,
"-Wno-unknown-pragmas"
)
if
has_config
(
"omp"
)
then
add_cxflags
(
"-fopenmp"
)
add_ldflags
(
"-fopenmp"
)
end
end
add_files
(
"src/utils/*.cc"
)
add_files
(
"src/utils/*.cc"
)
add_cxflags
(
"-Wno-unknown-pragmas"
)
target_end
()
target_end
()
target
(
"infinirt"
)
target
(
"infinirt"
)
...
...
xmake/cpu.lua
View file @
9daba5b8
...
@@ -4,14 +4,14 @@ target("infiniop-cpu")
...
@@ -4,14 +4,14 @@ target("infiniop-cpu")
on_install
(
function
(
target
)
end
)
on_install
(
function
(
target
)
end
)
set_warnings
(
"all"
,
"error"
)
set_warnings
(
"all"
,
"error"
)
add_cxflags
(
"-Wno-unknown-pragmas"
)
if
is_plat
(
"windows"
)
then
if
is_plat
(
"windows"
)
then
add_cxflags
(
"/wd4068"
)
if
has_config
(
"omp"
)
then
if
has_config
(
"omp"
)
then
add_cxflags
(
"/openmp"
)
add_cxflags
(
"/openmp"
)
end
end
else
else
add_cxflags
(
"-fPIC"
)
add_cxflags
(
"-fPIC"
,
"-Wno-unknown-pragmas"
)
if
has_config
(
"omp"
)
then
if
has_config
(
"omp"
)
then
add_cxflags
(
"-fopenmp"
)
add_cxflags
(
"-fopenmp"
)
add_ldflags
(
"-fopenmp"
)
add_ldflags
(
"-fopenmp"
)
...
...
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