Skip to content

Commit

Permalink
Check ARM_TOOLCHAIN_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
finnvoor committed Aug 4, 2024
1 parent 879abb8 commit ababdc1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Plugins/PDCPlugin/PDCPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ struct ModuleBuildRequest {
"/include",
"/include-fixed",
"/../../../../arm-none-eabi/include"
].map { "/usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1" + $0 }
].map { (ProcessInfo.processInfo.environment["ARM_TOOLCHAIN_PATH"] ?? "/usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1") + $0 }

guard FileManager.default.fileExists(atPath: gccIncludePaths.first!) else {
Diagnostics.error("Arm embedded toolchain not found. Ensure it is installed through the Playdate SDK (macOS) or manually and set in the ARM_TOOLCHAIN_PATH environment variable.")
throw Tools.Error.armNoneEabiGCCNotFound
}

let cFlags = gccIncludePaths.flatMap { ["-I", $0] }

Expand Down

0 comments on commit ababdc1

Please sign in to comment.