Skip to content

APPLE: Use System API for Temporary Directory location#3705

Closed
dgovil wants to merge 5 commits intoPixarAnimationStudios:devfrom
dgovil:UseSystemTempDirAPIs
Closed

APPLE: Use System API for Temporary Directory location#3705
dgovil wants to merge 5 commits intoPixarAnimationStudios:devfrom
dgovil:UseSystemTempDirAPIs

Conversation

@dgovil
Copy link
Copy Markdown
Collaborator

@dgovil dgovil commented Jul 4, 2025

Description of Change(s)

This change now uses the system API to get the temporary directory, instead of looking up the environment variable.
This matches the Windows behaviour, and is required for use with the stricter containerized temp directory in macOS 26 when used from sandbox processes.

Changes made:

  1. Add a new darwin.h and darwin.mm files in the arch target for using darwin specific code via ObjectiveC++
  2. Add ARCH_PLATFORM_HEADERS and ARCH_PLATFORM_CPPFILES to the arch cmakelists. Rename PLATFORM_LIBS to ARCH_PLATFORM_LIBS to align the style with the garch target.
  3. Change Arch_InitTmpDir to call Arch_DarwinGetTemporaryDirectory on Darwin platforms.

Checklist

@dgovil dgovil added the needs review Issue needing input/review by the repo maintainer (Pixar) label Jul 4, 2025
@jesschimein
Copy link
Copy Markdown
Collaborator

Filed as internal issue #USD-11182

(This is an automated message. See here for more information.)

@dgovil dgovil force-pushed the UseSystemTempDirAPIs branch from 2a38307 to c4af338 Compare September 24, 2025 18:40
@dgovil dgovil force-pushed the UseSystemTempDirAPIs branch from c4af338 to a207a4f Compare September 24, 2025 18:41
@jesschimein
Copy link
Copy Markdown
Collaborator

Hi Dhruv! It looks like there are some build tests that aren't passing on macOS; https://github.com/PixarAnimationStudios/OpenUSD/actions/runs/17986295830/job/52177008489. Would it be possible to have someone take a look? 🙏🏻

@dgovil
Copy link
Copy Markdown
Collaborator Author

dgovil commented Oct 7, 2025

Ah weird. I'll take a look today.

@dgovil
Copy link
Copy Markdown
Collaborator Author

dgovil commented Oct 7, 2025

I'm having a hard time reproducing the issues locally, but I have @danknowlton_apple looking into it

@dgovil
Copy link
Copy Markdown
Collaborator Author

dgovil commented Oct 7, 2025

@jesschimein I think I fixed this. Difference in memory allocations between debug/release.

@pixar-oss
Copy link
Copy Markdown
Member

Thank you!!

@pixar-oss pixar-oss closed this in 1404293 Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Issue needing input/review by the repo maintainer (Pixar)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants