File tree Expand file tree Collapse file tree 4 files changed +4
-11
lines changed
Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,6 @@ def setupFile
4545 paths := {
4646 oleanPath := loadConfig.lakeEnv.leanPath
4747 srcPath := loadConfig.lakeEnv.leanSrcPath
48- loadDynlibPaths := #[]
49- pluginPaths := #[loadConfig.lakeEnv.lake.sharedLib]
5048 }
5149 setupOptions := ⟨∅⟩
5250 : FileSetupInfo
@@ -59,15 +57,11 @@ def setupFile
5957 let outLv := buildConfig.verbosity.minLogLv
6058 let ws ← MainM.runLoggerIO (minLv := outLv) (ansiMode := .noAnsi) do
6159 loadWorkspace loadConfig
62- -- Imperfect heuristic for determine when the Lake plugin is needed.
63- let usesLake := imports.any (·.startsWith "Lake" )
6460 let imports := imports.foldl (init := #[]) fun imps imp =>
6561 if let some mod := ws.findModule? imp.toName then imps.push mod else imps
6662 let {dynlibs, plugins} ←
6763 MainM.runLogIO (minLv := outLv) (ansiMode := .noAnsi) do
6864 ws.runBuild (buildImportsAndDeps path imports) buildConfig
69- let plugins :=
70- if usesLake then plugins.push ws.lakeEnv.lake.sharedLib else plugins
7165 let paths : LeanPaths := {
7266 oleanPath := ws.leanPath
7367 srcPath := ws.leanSrcPath
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ LAKE=${LAKE:-../../.lake/build/bin/lake}
66# Test `setup-file` functionality
77# ---
88
9- # Test that, by default. no plugins are used.
9+ # Test that, by default, no plugins are used.
1010$LAKE setup-file bogus Foo | grep -F --color ' "pluginPaths":[]'
1111
12- # Test that a Lake import uses the Lake plugin .
13- $LAKE setup-file bogus Lake | ( grep -F --color ' "pluginPaths ":[]' && exit 1 || true)
12+ # Test that, by default, no dynlibs are used .
13+ $LAKE setup-file bogus Foo | grep -F --color ' "loadDynlibPaths ":[]'
1414
1515# Test that `setup-file` on an invalid Lean configuration file succeeds.
1616$LAKE -f invalid.lean setup-file invalid.lean Lake
Original file line number Diff line number Diff line change @@ -44,4 +44,3 @@ globs = [
4444[[lean_lib]]
4545name = "Lake"
4646srcDir = "lake"
47- moreLeanArgs = ["--plugin=${PREV_STAGE}/${CMAKE_RELATIVE_LIBRARY_OUTPUT_DIRECTORY}/libLake_shared${CMAKE_SHARED_LIBRARY_SUFFIX}"]
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ leanshared: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRAR
101101
102102Lake:
103103# lake is in its own subdirectory, so must adjust relative paths...
104- +"${LEAN_BIN}/leanmake" -C lake lib lib.export ../${LIB}/temp/LakeMain.o.export PKG=Lake $(LEANMAKE_OPTS) OUT="../${LIB}" LIB_OUT="../${LIB}/lean" TEMP_OUT="../${LIB}/temp" OLEAN_OUT="../${LIB}/lean" LEAN_OPTS+="--plugin=${PREV_STAGE}/${CMAKE_RELATIVE_LIBRARY_OUTPUT_DIRECTORY}/libLake_shared${CMAKE_SHARED_LIBRARY_SUFFIX}" EXTRA_SRC_ROOTS=LakeMain.lean
104+ +"${LEAN_BIN}/leanmake" -C lake lib lib.export ../${LIB}/temp/LakeMain.o.export PKG=Lake $(LEANMAKE_OPTS) OUT="../${LIB}" LIB_OUT="../${LIB}/lean" TEMP_OUT="../${LIB}/temp" OLEAN_OUT="../${LIB}/lean" EXTRA_SRC_ROOTS=LakeMain.lean
105105
106106${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libLake_shared${CMAKE_SHARED_LIBRARY_SUFFIX}: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libInit_shared${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared_1${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIB}/temp/libLean.a.export ${LIB}/temp/libLake.a.export
107107 @echo "[ ] Building $@"
You can’t perform that action at this time.
0 commit comments