c3c icon indicating copy to clipboard operation
c3c copied to clipboard

[compiler] compiler only builds one target out of many.

Open Nizarll opened this issue 1 week ago • 3 comments

looking at the flags of the compiler c3c compile seems to take the specific traget to build

However when not passing any flag c3c build only compiles one of out of the targets

compiler:

C3 Compiler Version:       0.7.8
Installed directory:       /home/nizar/.c3
Git Hash:                  5961bcaf866a1d866747c12426436864ebaa4cb1
Backends:                  LLVM
LLVM version:              19.1.7
LLVM default target:       x86_64-pc-linux-gnu
{
  "langrev": "1",
  "warnings":  [ "no-unused" ],
  "dependency-search-paths":  [ "lib" ],
  "dependencies":  [ "raylib55" ],
  "authors":  [ "John Doe <[email protected]>" ],
  "version": "0.1.0",
  "test-sources":  [ "test/**" ],
  "build-dir": "build",
  "output": "build",
  "targets": {
    "client": {
      "type": "executable",
      "sources":  [ "src/client/*", "src/shared/*" ]
    },
    "server": {
      "type": "executable",
      "sources":  [ "src/server/*", "src/shared/*" ]
    }
  },
  "cpu": "generic",
  "opt": "O0"
}

Nizarll avatar Dec 14 '25 18:12 Nizarll

To build a different target from the first, give the name for it, so for example c3c build server c3c build client

lerno avatar Dec 14 '25 19:12 lerno

Did this resolve your problem?

lerno avatar Dec 15 '25 12:12 lerno

To build a different target from the first, give the name for it, so for example c3c build server c3c build client

I think Nizarll expected a feature like build all targets by default instead of build the first target in project.json.

Sorrow-Scarlet avatar Dec 17 '25 00:12 Sorrow-Scarlet

To build a different target from the first, give the name for it, so for example c3c build server c3c build client

I think Nizarll expected a feature like build all targets by default instead of build the first target in project.json.

Yes i believe that is an intuitive behavior the compiler should do

Nizarll avatar Dec 20 '25 14:12 Nizarll