Skip to content

Commit

Permalink
fix: use archive instead of object files
Browse files Browse the repository at this point in the history
  • Loading branch information
arteevraina committed Jun 16, 2024
1 parent fa2749b commit 7aaa8a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/fpm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ subroutine cmd_build(settings)
endif

do i=1, size(targets)
if (targets(i)%ptr%target_type == FPM_TARGET_OBJECT .and. package%build%shared_library) then
if (targets(i)%ptr%target_type == FPM_TARGET_ARCHIVE .and. package%build%shared_library) then
!> Build directory for saving object files.
call model%compiler%generate_shared_library(model%package_name, targets(i)%ptr%output_dir)
exit
Expand Down
5 changes: 3 additions & 2 deletions src/fpm_compiler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1115,8 +1115,9 @@ subroutine generate_shared_library(self, package_name, output_dir)
!> Output directory of object files.
character(len=*), intent(in) :: output_dir

call run(self%fc // " --shared " // output_dir// "/" // package_name // "/*.o" // " -o " // "lib" // &
package_name // ".so", echo=self%echo, verbose=self%verbose)
call run(self%fc // " --shared " // " -o " // "lib" // package_name // ".so" // " " &
// output_dir // "/" // package_name // "/" // "lib" // package_name &
// ".a", echo=self%echo, verbose=self%verbose)
end subroutine generate_shared_library


Expand Down

0 comments on commit 7aaa8a6

Please sign in to comment.