Skip to content

Commit

Permalink
[minimally improve comments]
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Aug 19, 2023
1 parent 9f06df5 commit ae1362d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions test/dynLib-monolith/dub.sdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name "dynlib-monolith"
description "A 'monolithic' dynamic library, linking all dependencies statically (except for shared druntime/Phobos) and exporting select symbols explicitly via 'export'"
description "A 'monolithic' dynamic library, linking all dependencies statically (except for shared druntime/Phobos) and exporting only select symbols explicitly via 'export'"
targetType "dynamicLibrary"
dependency "inner_dep" path="inner_dep"

Expand All @@ -9,7 +9,9 @@ dflags "-fvisibility=hidden" platform="gdc"
# not supported by DMD

# With LDC on Windows, code ending up in a DLL is compiled with
# `-fvisibility=public -dllimport=all` by default. So we additionally need
# to override `-dllimport` to use the shared druntime/Phobos DLLs (used by
# default for dynamic libraries), which is also passed down to all deps:
# `-fvisibility=public -dllimport=all` by default. So we additionally need to
# override `-dllimport` to dllimport from the shared druntime/Phobos DLLs only
# (used by default for dynamic libraries; with static druntime/Phobos via
# `-link-defaultlib-shared=false`, use `-dllimport=none`).
# This flag is also passed down to all deps.
dflags "-dllimport=defaultLibsOnly" platform="windows-ldc"
2 changes: 1 addition & 1 deletion test/exe-shared-defaultlib/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ targetType "executable"
dependency "staticlib-simple" path="../1-staticLib-simple/"

# With LDC on Windows, `-link-defaultlib-shared` is passed down for compiling
# staticlib-simple (for an implicit `-dllimport=defaultLibsOnly`).
# all dependencies (for an implicit `-dllimport=defaultLibsOnly`).
dflags "-link-defaultlib-shared" platform="ldc"

# no libphobos2.dll/dylib with DMD on Windows/Mac
Expand Down

0 comments on commit ae1362d

Please sign in to comment.