Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make build configuration (release/debug) configurable in SwiftPM plugin #8

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ole
Copy link
Owner

@ole ole commented Mar 4, 2024

No description provided.

@ole
Copy link
Owner Author

ole commented Mar 4, 2024

Unfortunately, building in debug mode doesn't work. I have no idea why.

Relevant error: <unknown>:0: error: index output filenames do not match input source files

On macOS:

$ swift package --triple armv6m-none-none-eabi --toolchain /Library/Developer/Toolchains/swift-latest.xctoolchain/ --verbose link --objcopy /opt/homebrew/opt/llvm/bin/llvm-objcopy --configuration debug
…
info: [link] /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/clang \
    --target=armv6m-none-eabi \
    -mfloat-abi=soft \
    -march=armv6m \
    -O3 \
    -nostdlib \
    -c \
    /Users/elo/code/Raspberry-Pi-Pico/BootstrappedSwift/.build/plugins/Link/outputs/intermediates/bs2_default_padded_checksummed.s \
    -o \
    /Users/elo/code/Raspberry-Pi-Pico/BootstrappedSwift/.build/plugins/Link/outputs/intermediates/bs2_default_padded_checksummed.s.o
info: [link] Creating app executable
info: [link] Building product 'App' with config 'debug'
Building for debugging...
[0/5] Write swift-version-65E5C3A9CA389411.txt
warning: ignoring '-enable-batch-mode' because '-whole-module-optimization' was also specified
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
Apple Swift version 5.11-dev (LLVM 48dba337c6a2104, Swift 823db1fc0821481)
Target: armv6m-none-none-eabi
[2/7] Emitting module RP2040
[3/7] Compiling RP2040 GPIO.swift
<unknown>:0: error: index output filenames do not match input source files

error: [link] Building product 'App' failed
error: BuildError()

I'm getting the same error on Linux.

@ole ole marked this pull request as draft March 4, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant