Skip to content

Commit f4cce3f

Browse files
committed
chore: use libPrefixOnWindows in core build
1 parent 9b1109c commit f4cce3f

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -844,16 +844,8 @@ endfunction()
844844
string(REPLACE "ROOT" "${CMAKE_BINARY_DIR}" LEANC_CC "${LEANC_CC}")
845845
string(REPLACE "ROOT" "${CMAKE_BINARY_DIR}" LEANC_INTERNAL_FLAGS "${LEANC_INTERNAL_FLAGS}")
846846
string(REPLACE "ROOT" "${CMAKE_BINARY_DIR}" LEANC_INTERNAL_LINKER_FLAGS "${LEANC_INTERNAL_LINKER_FLAGS}")
847-
set(LEANC_OPTS_TOML "${LEANC_OPTS} ${LEANC_EXTRA_CC_FLAGS} ${LEANC_INTERNAL_FLAGS}")
848-
set(LINK_OPTS_TOML "${LEANC_INTERNAL_LINKER_FLAGS} -L${CMAKE_BINARY_DIR}/lib/lean ${LEAN_EXTRA_LINKER_FLAGS}")
849847

850848
toml_escape("${LEAN_EXTRA_MAKE_OPTS}" LEAN_EXTRA_OPTS_TOML)
851-
toml_escape("${LEANC_OPTS_TOML}" LEANC_OPTS_TOML)
852-
toml_escape("${LINK_OPTS_TOML}" LINK_OPTS_TOML)
853-
854-
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
855-
set(LAKE_LIB_PREFIX "lib")
856-
endif()
857849

858850
if(${CMAKE_BUILD_TYPE} MATCHES "Debug|Release|RelWithDebInfo|MinSizeRel")
859851
set(CMAKE_BUILD_TYPE_TOML "${CMAKE_BUILD_TYPE}")

src/lakefile.toml.in

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ buildDir = "${CMAKE_BINARY_DIR}"
2121
# will expect the previous stage's artifacts to be in the build directory.
2222
restoreAllArtifacts = true
2323

24+
# Lean expects its libraries to always have a `lib` prefix
25+
libPrefixOnWindows = true
26+
2427
# The directory of Lean source files (i.e., `src`)
2528
srcDir = "${LEAN_SOURCE_DIR}"
2629

@@ -46,17 +49,14 @@ ${LEAN_EXTRA_LAKEFILE_TOML}
4649

4750
[[lean_lib]]
4851
name = "Init"
49-
libName = "${LAKE_LIB_PREFIX}Init"
5052
defaultFacets = ["static", "static.export"]
5153

5254
[[lean_lib]]
5355
name = "Std"
54-
libName = "${LAKE_LIB_PREFIX}Std"
5556
defaultFacets = ["static", "static.export"]
5657

5758
[[lean_lib]]
5859
name = "Lean"
59-
libName = "${LAKE_LIB_PREFIX}Lean"
6060
defaultFacets = ["static", "static.export"]
6161
globs = [
6262
# Library root
@@ -72,17 +72,14 @@ name = "Lake"
7272
srcDir = "lake"
7373
# Build Lake and all its submodules (which may not be imported elsewhere)
7474
globs = ["Lake.*"]
75-
libName = "${LAKE_LIB_PREFIX}Lake"
7675
defaultFacets = ["static", "static.export"]
7776

7877
[[lean_lib]]
7978
name = "LakeMain"
8079
srcDir = "lake"
81-
libName = "${LAKE_LIB_PREFIX}LakeMain"
8280
defaultFacets = ["static.export"]
8381

8482
[[lean_lib]]
8583
name = "Leanc"
8684
srcDir = "${CMAKE_BINARY_DIR}/leanc"
87-
libName = "${LAKE_LIB_PREFIX}Leanc"
8885
defaultFacets = ["static"]

0 commit comments

Comments
 (0)