@@ -52,17 +52,19 @@ The names of the library's root modules
5252@[inline] public def isBuildableModule (mod : Name) (self : LeanLib) : Bool :=
5353 self.config.isBuildableModule mod
5454
55- /-- The name of the library artifact. -/
56- @[inline] public def libName (self : LeanLib) : String :=
57- self.config.libName
58-
5955/-- Whether this library's native binaries should be prefixed with `lib` on Windows. -/
6056@[inline] public def libPrefixOnWindows (self : LeanLib) : Bool :=
6157 self.config.libPrefixOnWindows || self.pkg.libPrefixOnWindows
6258
59+ /-- The name of the native library (e.g., what is passed to `-l`). -/
60+ public def libName (self : LeanLib) : String :=
61+ if self.libPrefixOnWindows && System.Platform.isWindows then
62+ s! "lib{ self.config.libName} "
63+ else self.config.libName
64+
6365/-- The file name of the library's static binary (i.e., its `.a`) -/
6466@[inline] public def staticLibFileName (self : LeanLib) : FilePath :=
65- nameToStaticLib self.config. libName self.libPrefixOnWindows
67+ nameToStaticLib self.libName
6668
6769/-- The path to the static library in the package's `libDir`. -/
6870@[inline] public def staticLibFile (self : LeanLib) : FilePath :=
@@ -74,7 +76,7 @@ The names of the library's root modules
7476
7577/-- The file name of the library's shared binary (i.e., its `dll`, `dylib`, or `so`) . -/
7678@[inline] public def sharedLibFileName (self : LeanLib) : FilePath :=
77- nameToSharedLib self.config. libName self.libPrefixOnWindows
79+ nameToSharedLib self.libName
7880
7981/-- The path to the shared library in the package's `libDir`. -/
8082@[inline] public def sharedLibFile (self : LeanLib) : FilePath :=
0 commit comments