setupLDLibraryPath Keep host-side dev tool runtimes resolvable before any helper process starts. This is especially important for Python extensions and other host tools that link against libraries from tmp/deps/ -dev/lib.
()
| 232 | // This is especially important for Python extensions and other host tools that |
| 233 | // link against libraries from tmp/deps/<host>-dev/lib. |
| 234 | func (b BuildConfig) setupRuntimePath() { |
| 235 | tmpDevDir := filepath.Join(dirs.TmpDepsDir, b.PortConfig.HostName+"-dev") |
| 236 | for _, devLibDir := range []string{ |
| 237 | filepath.Join(tmpDevDir, "lib"), |
| 238 | filepath.Join(tmpDevDir, "lib64"), |
| 239 | } { |
| 240 | if !fileio.PathExists(devLibDir) { |
| 241 | continue |
| 242 | } |
| 243 | |
| 244 | switch runtime.GOOS { |
| 245 | case "linux": |
| 246 | b.envBackup.setenv("LD_LIBRARY_PATH", env.JoinPaths("LD_LIBRARY_PATH", devLibDir)) |
| 247 | case "darwin": |
| 248 | b.envBackup.setenv("DYLD_LIBRARY_PATH", env.JoinPaths("DYLD_LIBRARY_PATH", devLibDir)) |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | func (b BuildConfig) setupPythonEnvs() { |
| 254 | // Ensure PYTHONUSERBASE for pip. |
no test coverage detected