nathanregner / platformio2nix

1 stars 1 forks source link

Object files & other intermediate compile/build artifacts end up in derivation output path. #5

Closed crabdancing closed 3 days ago

crabdancing commented 4 days ago

When building the Marlin example, I end up with a src/ directory in the .out derivation root with a lot of .o files:

``` mega2560/ mega2560/FrameworkArduino/ mega2560/FrameworkArduino/CDC.cpp.o mega2560/FrameworkArduino/HardwareSerial.cpp.o mega2560/FrameworkArduino/HardwareSerial0.cpp.o mega2560/FrameworkArduino/HardwareSerial1.cpp.o mega2560/FrameworkArduino/HardwareSerial2.cpp.o mega2560/FrameworkArduino/HardwareSerial3.cpp.o mega2560/FrameworkArduino/IPAddress.cpp.o mega2560/FrameworkArduino/PluggableUSB.cpp.o mega2560/FrameworkArduino/Print.cpp.o mega2560/FrameworkArduino/Stream.cpp.o mega2560/FrameworkArduino/Tone.cpp.o mega2560/FrameworkArduino/USBCore.cpp.o mega2560/FrameworkArduino/WInterrupts.c.o mega2560/FrameworkArduino/WMath.cpp.o mega2560/FrameworkArduino/WString.cpp.o mega2560/FrameworkArduino/abi.cpp.o mega2560/FrameworkArduino/hooks.c.o mega2560/FrameworkArduino/main.cpp.o mega2560/FrameworkArduino/new.cpp.o mega2560/FrameworkArduino/wiring.c.o mega2560/FrameworkArduino/wiring_analog.c.o mega2560/FrameworkArduino/wiring_digital.c.o mega2560/FrameworkArduino/wiring_pulse.S.o mega2560/FrameworkArduino/wiring_pulse.c.o mega2560/FrameworkArduino/wiring_shift.c.o mega2560/firmware.elf mega2560/firmware.hex mega2560/lib420/ mega2560/lib420/Wire/ mega2560/lib420/Wire/Wire.cpp.o mega2560/lib420/Wire/utility/ mega2560/lib420/Wire/utility/twi.c.o mega2560/lib420/libWire.a mega2560/lib84e/ mega2560/lib84e/SPI/ mega2560/lib84e/SPI/SPI.cpp.o mega2560/lib84e/libSPI.a mega2560/libFrameworkArduino.a mega2560/libFrameworkArduinoVariant.a mega2560/src/ mega2560/src/src/ mega2560/src/src/HAL/ mega2560/src/src/HAL/AVR/ mega2560/src/src/HAL/AVR/HAL.cpp.o mega2560/src/src/HAL/AVR/HAL_SPI.cpp.o mega2560/src/src/HAL/AVR/MarlinSerial.cpp.o mega2560/src/src/HAL/AVR/Servo.cpp.o mega2560/src/src/HAL/AVR/eeprom.cpp.o mega2560/src/src/HAL/AVR/fast_pwm.cpp.o mega2560/src/src/HAL/AVR/fastio.cpp.o mega2560/src/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp.o mega2560/src/src/HAL/shared/ mega2560/src/src/HAL/shared/Delay.cpp.o mega2560/src/src/HAL/shared/HAL.cpp.o mega2560/src/src/HAL/shared/MinSerial.cpp.o mega2560/src/src/HAL/shared/eeprom_api.cpp.o mega2560/src/src/HAL/shared/esp_wifi.cpp.o mega2560/src/src/HAL/shared/servo.cpp.o mega2560/src/src/MarlinCore.cpp.o mega2560/src/src/core/ mega2560/src/src/core/serial.cpp.o mega2560/src/src/core/utility.cpp.o mega2560/src/src/gcode/ mega2560/src/src/gcode/calibrate/ mega2560/src/src/gcode/calibrate/G28.cpp.o mega2560/src/src/gcode/config/ mega2560/src/src/gcode/config/M200-M205.cpp.o mega2560/src/src/gcode/config/M220.cpp.o mega2560/src/src/gcode/config/M221.cpp.o mega2560/src/src/gcode/config/M301.cpp.o mega2560/src/src/gcode/config/M302.cpp.o mega2560/src/src/gcode/config/M92.cpp.o mega2560/src/src/gcode/control/ mega2560/src/src/gcode/control/M108_M112_M410.cpp.o mega2560/src/src/gcode/control/M111.cpp.o mega2560/src/src/gcode/control/M120_M121.cpp.o mega2560/src/src/gcode/control/M17_M18_M84.cpp.o mega2560/src/src/gcode/control/M211.cpp.o mega2560/src/src/gcode/control/M80_M81.cpp.o mega2560/src/src/gcode/control/M85.cpp.o mega2560/src/src/gcode/control/M999.cpp.o mega2560/src/src/gcode/control/T.cpp.o mega2560/src/src/gcode/eeprom/ mega2560/src/src/gcode/eeprom/M500-M504.cpp.o mega2560/src/src/gcode/gcode.cpp.o mega2560/src/src/gcode/gcode_d.cpp.o mega2560/src/src/gcode/geometry/ mega2560/src/src/gcode/geometry/G92.cpp.o mega2560/src/src/gcode/geometry/M206_M428.cpp.o mega2560/src/src/gcode/host/ mega2560/src/src/gcode/host/M110.cpp.o mega2560/src/src/gcode/host/M113.cpp.o mega2560/src/src/gcode/host/M114.cpp.o mega2560/src/src/gcode/host/M115.cpp.o mega2560/src/src/gcode/host/M118.cpp.o mega2560/src/src/gcode/host/M119.cpp.o mega2560/src/src/gcode/motion/ mega2560/src/src/gcode/motion/G0_G1.cpp.o mega2560/src/src/gcode/motion/G2_G3.cpp.o mega2560/src/src/gcode/motion/G4.cpp.o mega2560/src/src/gcode/motion/M400.cpp.o mega2560/src/src/gcode/parser.cpp.o mega2560/src/src/gcode/queue.cpp.o mega2560/src/src/gcode/stats/ mega2560/src/src/gcode/stats/M31.cpp.o mega2560/src/src/gcode/stats/M75-M78.cpp.o mega2560/src/src/gcode/temp/ mega2560/src/src/gcode/temp/M104_M109.cpp.o mega2560/src/src/gcode/temp/M105.cpp.o mega2560/src/src/gcode/temp/M106_M107.cpp.o mega2560/src/src/gcode/temp/M140_M190.cpp.o mega2560/src/src/gcode/temp/M155.cpp.o mega2560/src/src/gcode/temp/M303.cpp.o mega2560/src/src/gcode/units/ mega2560/src/src/gcode/units/M82_M83.cpp.o mega2560/src/src/inc/ mega2560/src/src/inc/Warnings.cpp.o mega2560/src/src/lcd/ mega2560/src/src/lcd/marlinui.cpp.o mega2560/src/src/lcd/utf8.cpp.o mega2560/src/src/libs/ mega2560/src/src/libs/buzzer.cpp.o mega2560/src/src/libs/crc16.cpp.o mega2560/src/src/libs/numtostr.cpp.o mega2560/src/src/libs/stopwatch.cpp.o mega2560/src/src/libs/vector_3.cpp.o mega2560/src/src/module/ mega2560/src/src/module/endstops.cpp.o mega2560/src/src/module/motion.cpp.o mega2560/src/src/module/planner.cpp.o mega2560/src/src/module/settings.cpp.o mega2560/src/src/module/stepper/ mega2560/src/src/module/stepper/indirection.cpp.o mega2560/src/src/module/stepper.cpp.o mega2560/src/src/module/temperature.cpp.o mega2560/src/src/module/tool_change.cpp.o project.checksum ```

I think most of this probably shouldn't be here? :P

crabdancing commented 3 days ago

Hmm. I think this is just because the example is a simple as possible and copies the entire build product directory in the manually written installPhase? In that case, it's not a problem with plaformio2nix core code. If anything, maybe should open an issue to track adding features to automatically generate sane patchPhase/buildPhase/installPhase defaults for packaging a given PlatformIO project. :P