Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ezkotlin-feature-ohos-arm64
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhen.jiang
ezkotlin-feature-ohos-arm64
Commits
c7bd18b9
Commit
c7bd18b9
authored
Jan 30, 2026
by
zhen.jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决.a嵌套导致符号找不到的问题
parent
50ad1ae6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
Linker.kt
native/utils/src/org/jetbrains/kotlin/konan/target/Linker.kt
+21
-8
No files found.
native/utils/src/org/jetbrains/kotlin/konan/target/Linker.kt
View file @
c7bd18b9
...
...
@@ -49,14 +49,27 @@ private fun staticGnuArCommands(ar: String, executable: ExecutableFile,
},
Command
(
"cmd"
,
"/c"
,
"del"
,
"/q"
,
temp
))
}
HostManager
.
hostIsLinux
||
HostManager
.
hostIsMac
->
listOf
(
Command
(
ar
,
"cqT"
,
executable
).
apply
{
+
objectFiles
+
libraries
},
Command
(
"/bin/sh"
,
"-c"
).
apply
{
+
"printf 'create $executable\\naddlib $executable\\nsave\\nend' | $ar -M"
})
// HostManager.hostIsLinux || HostManager.hostIsMac -> listOf(
// Command(ar, "cqT", executable).apply {
// +objectFiles
// +libraries
// },
// Command("/bin/sh", "-c").apply {
// +"printf 'create $executable\\naddlib $executable\\nsave\\nend' | $ar -M"
// })
HostManager
.
hostIsLinux
||
HostManager
.
hostIsMac
->
{
// Create a regular archive and use [L] modifier for adding libraries
// to flatten nested archives. The [L] modifier extracts archive contents
// instead of adding archives as-is, ensuring .a inputs are properly processed.
val
commands
=
mutableListOf
<
Command
>()
if
(
objectFiles
.
isNotEmpty
())
{
commands
.
add
(
Command
(
ar
,
"qcs"
,
executable
).
apply
{
+
objectFiles
})
}
if
(
libraries
.
isNotEmpty
())
{
commands
.
add
(
Command
(
ar
,
"qsL"
,
executable
).
apply
{
+
libraries
})
}
commands
}
else
->
TODO
(
"Unsupported host ${HostManager.host}"
)
}
...
...
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