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
0e8d81d0
Commit
0e8d81d0
authored
Mar 26, 2025
by
PanZezhong
Browse files
issue/123 修复昇腾平台编译utils缺少fpic选项问题
parent
c0d94151
Changes
2
Hide 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 @
0e8d81d0
...
...
@@ -120,8 +120,23 @@ target("infini-utils")
set_kind
(
"static"
)
on_install
(
function
(
target
)
end
)
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_cxflags
(
"-Wno-unknown-pragmas"
)
target_end
()
target
(
"infinirt"
)
...
...
xmake/cpu.lua
View file @
0e8d81d0
...
...
@@ -4,14 +4,14 @@ target("infiniop-cpu")
on_install
(
function
(
target
)
end
)
set_warnings
(
"all"
,
"error"
)
add_cxflags
(
"-Wno-unknown-pragmas"
)
if
is_plat
(
"windows"
)
then
add_cxflags
(
"/wd4068"
)
if
has_config
(
"omp"
)
then
add_cxflags
(
"/openmp"
)
end
else
add_cxflags
(
"-fPIC"
)
add_cxflags
(
"-fPIC"
,
"-Wno-unknown-pragmas"
)
if
has_config
(
"omp"
)
then
add_cxflags
(
"-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