[PR #542] [MERGED] Pass HOMEBREW_* environment variables on through native_image #612

Closed
opened 2025-12-30 01:25:39 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/542
Author: @holzensp
Created: 6/18/2024
Status: Merged
Merged: 6/26/2024
Merged by: @holzensp

Base: mainHead: homebrewTransparancy


📝 Commits (1)

  • 069ad2d Pass HOMEBREW_* environment variables on through native_image

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 pkl-cli/pkl-cli.gradle.kts (+2 -0)

📄 Description

We currently have to use NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION to let builds pass in Homebrew. This is because native-image runs its child processes (such as the platform-dependent C compiler) in a "clean" environment. In Homebrew, such compilers (clang, gcc, etc) are wrapper scripts that first check the Homebrew environment is intact.

GraalVM folks have warned that NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION will go away.

This PR preserves all environment variables starting with HOMEBREW_ for the inner native-image environment.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/542 **Author:** [@holzensp](https://github.com/holzensp) **Created:** 6/18/2024 **Status:** ✅ Merged **Merged:** 6/26/2024 **Merged by:** [@holzensp](https://github.com/holzensp) **Base:** `main` ← **Head:** `homebrewTransparancy` --- ### 📝 Commits (1) - [`069ad2d`](https://github.com/apple/pkl/commit/069ad2ddef4b7b92189f1d81e412c9df075db3ea) Pass `HOMEBREW_*` environment variables on through `native_image` ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `pkl-cli/pkl-cli.gradle.kts` (+2 -0) </details> ### 📄 Description We currently have to use `NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION` to let builds pass in Homebrew. This is because `native-image` runs its child processes (such as the platform-dependent C compiler) in a "clean" environment. In Homebrew, such compilers (`clang`, `gcc`, etc) are wrapper scripts that first check the Homebrew environment is intact. GraalVM folks have warned that `NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION` will go away. This PR preserves all environment variables starting with `HOMEBREW_` for the inner `native-image` environment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:25:39 +01:00
adam closed this issue 2025-12-30 01:25:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#612