Skip to content

Commit

Permalink
{cc,linker}: Don't use -B anymore, doesn't seem to work
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Dec 21, 2024
1 parent 7472956 commit edd8330
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/class/cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ static void add_flags(cmd_t* cmd, compile_task_t* task) {
}

static void add_common(cmd_t* cmd) {
cmd_addf(cmd, "-B%s", install_prefix);
// XXX For some reason, at least with clang, -B doesn't work.

cmd_addf(cmd, "-isystem=%s/include", install_prefix);
}

static void get_include_deps(compile_task_t* task, char* cc) {
Expand Down
2 changes: 1 addition & 1 deletion src/class/linker.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ link:;
char* cc = getenv("CC");
cc = cc == NULL ? "cc" : cc;
cmd_create(&cmd, cc, "-fdiagnostics-color=always", "-o", out, NULL);
cmd_addf(&cmd, "-B%s", install_prefix);
cmd_addf(&cmd, "-L%s/lib", install_prefix);

#if defined(__APPLE__)
cmd_add(&cmd, "-rpath");
Expand Down

0 comments on commit edd8330

Please sign in to comment.