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

C3C compile command -o option regression #1994

Open
MaxBeaud opened this issue Feb 25, 2025 · 6 comments
Open

C3C compile command -o option regression #1994

MaxBeaud opened this issue Feb 25, 2025 · 6 comments
Assignees
Labels
Fixed Needs Verification Fixed, but needs verification that it works
Milestone

Comments

@MaxBeaud
Copy link

There seems to be a regression on the -o option for the compile command.
The -o no longer accepts a path containing a folder.

The version

c3c --version
C3 Compiler Version:       0.6.8 (Pre-release, Feb 25 2025 00:12:09)
Installed directory:       /usr/lib/c3c/
Git Hash:                  1dfc24822e4dc3b100b3950c2134ea495534e6d0
Backends:                  LLVM
LLVM version:              17.0.6
LLVM default target:       x86_64-pc-linux-gnu

The issue

# c3c compile libs/raylib/raylib.c3i libs/clay/clay.c3 libs/clay/clay-raylib-renderer.c3 src/main.c3 \
        -l libs/clay/libclay.a -l libs/raylib/libraylib.a \
        --cc gcc \
        -Oz \
        -o build/ray_c3 \
        --threads 12

Whilst the build folder does exist the build still fails with the following error Could not emit 'obj/linux-x64/build/ray_c3.o': File could not be opened.

The aforementioned behaviour does not happen if only a file name is given.

# c3c compile libs/raylib/raylib.c3i libs/clay/clay.c3 libs/clay/clay-raylib-renderer.c3 src/main.c3         -l libs/clay/libclay.a -l libs/raylib/libraylib.a         --cc gcc         -Oz         -o main         --threads 12
# Program linked to executable 'main'.
@lerno lerno self-assigned this Feb 25, 2025
@lerno lerno added the Fixed Needs Verification Fixed, but needs verification that it works label Feb 25, 2025
@lerno lerno added this to the 0.6.8 milestone Feb 25, 2025
@MaxBeaud
Copy link
Author

The same behaviour has also been observed on commit ee5b9e58.

@MaxBeaud
Copy link
Author

On 0c33b78a2f97a1cbe12c2cdf97595020f101dad2, again:

c3c compile src/main.c3 src/sprites.c3 libs/raylib/raylib.c3i \
        -l libs/raylib/libraylib.a \
        --cc gcc \
        -Oz \
        -o build/ray_c3 \
        --threads 12
Could not emit '.build/obj/linux-x64/build/ray_c3.o': File could not be opened

@lerno
Copy link
Collaborator

lerno commented Mar 5, 2025

Is this working as expected now?

@MaxBeaud
Copy link
Author

MaxBeaud commented Mar 7, 2025

Other than the empty .build/obj/linux-x64 folders it is building and running.

@lerno
Copy link
Collaborator

lerno commented Mar 7, 2025

Is it ok like that?

@MaxBeaud
Copy link
Author

MaxBeaud commented Mar 9, 2025

I feel if a build directory is specified then that is where all build artifacts be put. Otherwise, having a default .build directory is a nice idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Needs Verification Fixed, but needs verification that it works
Projects
None yet
Development

No branches or pull requests

2 participants