Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
DeepEP
Commits
05fc3436
Commit
05fc3436
authored
Mar 13, 2026
by
lishen
Browse files
编译添加强制全部编译选项
parent
3b7c9b73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
build.sh
build.sh
+6
-3
No files found.
build.sh
View file @
05fc3436
...
...
@@ -165,14 +165,17 @@ SOURCES=(
# 初始化对象文件列表
OBJECTS
=()
# 检查是否需要强制重新编译(如果 shmem 库有更新)
FORCE_REBUILD
=
true
# 编译每个源文件
for
src
in
"
${
SOURCES
[@]
}
"
;
do
# 生成对应的 .o 文件名(保留目录结构或扁平化)
obj
=
"build_/
$(
basename
"
${
src
%.cu
}
.o"
)
"
OBJECTS+
=(
"
$obj
"
)
# 检查是否需要重新编译
:条件:obj 不存在,或 src 比 obj 新
if
[[
!
-f
"
$obj
"
]]
||
[[
"
$src
"
-nt
"
$obj
"
]]
;
then
# 检查是否需要重新编译
if
[[
"
$FORCE_REBUILD
"
==
true
]]
||
[[
!
-f
"
$obj
"
]]
||
[[
"
$src
"
-nt
"
$obj
"
]]
;
then
echo
"Compiling
$src
->
$obj
"
hipcc
${
INCLUDE_PATHS
}
-c
"
$src
"
-o
"
$obj
"
${
COMPILE_OPTIONS
}
else
...
...
@@ -185,7 +188,7 @@ OUTPUT="deep_ep/deep_ep_cpp.cpython-310-x86_64-linux-gnu.so"
# 检查是否需要重新链接
need_link
=
false
if
[[
!
-f
"
$OUTPUT
"
]]
;
then
if
[[
"
$FORCE_REBUILD
"
==
true
]]
||
[[
!
-f
"
$OUTPUT
"
]]
;
then
need_link
=
true
else
for
obj
in
"
${
OBJECTS
[@]
}
"
;
do
...
...
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