Documentation

Lake.Config.InstallPath

Standard path of lean in a Lean installation.

Instances For

    Standard path of leanc in a Lean installation.

    Instances For

      Standard path of llvm-ar in a Lean installation.

      Instances For

        Standard path of clang in a Lean installation.

        Instances For

          Standard path of libleanshared in a Lean installation.

          Instances For

            Path information about the local Lean installation.

            Instances For

              A SearchPath including the Lean installation's shared library directories (i.e., the system library and Lean library directories).

              Instances For

                The LEAN_CC of the Lean installation.

                Instances For

                  Standard path of lake in a Lake installation.

                  Instances For

                    Path information about the local Lake installation.

                    Instances For

                      Try to find the sysroot of the given lean command (if it exists) by calling lean --print-prefix and returning the path it prints. Defaults to trying the lean in PATH.

                      Instances For

                        Construct the LeanInstall object for the given Lean sysroot.

                        Does the following:

                        1. Invokes lean to find out its githash.
                        2. Finds the ar and cc to use with Lean.
                        3. Computes the sub-paths of the Lean install.

                        For (1), if the invocation fails, githash is set to the empty string.

                        For (2), if LEAN_AR or LEAN_CC are defined, it uses those paths. Otherwise, if Lean is packaged with an llvm-ar and/or clang, use them. If not, use the ar and/or cc in the system's PATH. This last step is needed because internal builds of Lean do not bundle these tools (unlike user-facing releases).

                        We also track whether LEAN_CC was set to determine whether it should be set in the future for lake env. This is because if LEAN_CC was not set, it needs to remain not set for leanc to work. Even setting it to the bundled compiler will break leanc -- see leanprover/lean4#1281.

                        For (3), it assumes that the Lean installation is organized the normal way. That is, with its binaries located in /bin, its Lean libraries in /lib/lean, and its system libraries in /lib.

                        Instances For

                          Try to find the installation of the given lean command by calling findLeanCmdHome?. See LeanInstall.get for how it assumes the Lean install is organized.

                          Instances For

                            Check if Lake's executable is co-located with Lean, and, if so, try to return their joint home by assuming they are both located at /bin.

                            Instances For

                              Try to get Lake's home by assuming the executable is located at /build/bin/lake.

                              Instances For

                                Try to find Lean's installation by first checking the LEAN_SYSROOT environment variable and then by trying findLeanCmdHome?. See LeanInstall.get for how it assumes the Lean install is organized.

                                Instances For

                                  Try to find Lake's installation by first checking the LAKE_HOME environment variable and then by trying the lakePackageHome? of the running executable.

                                  It assumes that the Lake installation is organized the same way it is built. That is, with its binary located at /build/bin/lake and its static library and .olean files in /build/lib, and its source files located directly in .

                                  Instances For

                                    Try to get Lake's install path by first trying findLakeLeanHome? then by running findLeanInstall? and findLakeInstall?.

                                    If Lake is co-located with lean (i.e., there is lean executable in the same directory as itself), it will assume it was installed with Lean and that both Lake's and Lean's files are all located their shared sysroot. In particular, their binaries are located in /bin, their Lean libraries in /lib/lean, Lean's source files in /src/lean, and Lake's source files in /src/lean/lake.

                                    Instances For