Skip to content

Commit

Permalink
fix(unikraft): Hardcode language libraries before libcs (#736)
Browse files Browse the repository at this point in the history
Reviewed-by: Stefan Jumarea <[email protected]>
Reviewed-by: Razvan Deaconescu <[email protected]>
Approved-by: Razvan Deaconescu <[email protected]>
  • Loading branch information
craciunoiuc authored Aug 22, 2023
2 parents 775ff7b + 3583cd9 commit d39b3e7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions unikraft/app/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,29 @@ func (app application) MakeArgs(tc target.Target) (*core.MakeArgs, error) {
unformattedLibraries[k] = v
}

// Add language libraries that we know require a specific ordering.
// Currently, these are C++-related libraries. Others may be added as required.
if unformattedLibraries["libcxxabi"] != nil {
libraries = append(libraries, unformattedLibraries["libcxxabi"].Path())
delete(unformattedLibraries, "libcxxabi")
}
if unformattedLibraries["libcxx"] != nil {
libraries = append(libraries, unformattedLibraries["libcxx"].Path())
delete(unformattedLibraries, "libcxx")
}
if unformattedLibraries["libunwind"] != nil {
libraries = append(libraries, unformattedLibraries["libunwind"].Path())
delete(unformattedLibraries, "libunwind")
}
if unformattedLibraries["compiler-rt"] != nil {
libraries = append(libraries, unformattedLibraries["compiler-rt"].Path())
delete(unformattedLibraries, "compiler-rt")
}
if unformattedLibraries["libgo"] != nil {
libraries = append(libraries, unformattedLibraries["libgo"].Path())
delete(unformattedLibraries, "libgo")
}

// All supported libCs right now
if unformattedLibraries["musl"] != nil {
libraries = append(libraries, unformattedLibraries["musl"].Path())
Expand Down

0 comments on commit d39b3e7

Please sign in to comment.