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

Fix frugality on FreeBSD #70

Merged
merged 5 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,3 @@ To install a project with Bob, run:
```console
bob install
```

## Roadmap

- v0.2.2: Resolve #55 and #56 (should be ready to replace v0.1.0 on IAR and Umber).
- v0.2.3: Resolve #43 (quick QOL improvement).
- v0.2.4: Resolve #48 and #51 (clean and pruning, maybe even uninstalling? But that's yet to be defined).
- v0.2.5: Resolve #54 (dependency management system).
2 changes: 1 addition & 1 deletion build.fl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import bob
let src = Fs.list("src").where(|path| path.endswith(".c") && !path.startswith("src/flamingo")) + ["src/flamingo/flamingo.c"]

let obj = Cc([
"-std=c11",
"-std=c11", "-g",
"-Wall", "-Wextra", "-Werror",
"-Wno-unused-parameter",
"-Isrc", "-Isrc/flamingo/runtime",
Expand Down
5 changes: 3 additions & 2 deletions src/build_step.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ int add_build_step(uint64_t unique, char const* name, build_step_cb_t cb, void*

// Actually add new build step.

build_steps = realloc(build_steps, (build_step_count + 1) * sizeof *build_steps);
build_steps = realloc(build_steps, ++build_step_count * sizeof *build_steps);
assert(build_steps != NULL);
build_step_t* const step = &build_steps[build_step_count++];
build_step_t* const step = &build_steps[build_step_count - 1];

step->unique = unique;
step->name = name;
step->cb = cb;
step->data_count = 1;
Expand Down
5 changes: 1 addition & 4 deletions src/class/linker.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <str.h>

#include <assert.h>
#include <errno.h>
#include <fts.h>
#include <inttypes.h>
#include <stdio.h>
Expand Down Expand Up @@ -195,9 +194,7 @@ static int prep_link(state_t* state, flamingo_arg_list_t* args, flamingo_val_t**

// XOR'ing makes sure order doesn't matter.

char* const CLEANUP_STR tmp = strndup(src->str.str, src->str.size);
assert(tmp != NULL);
total_hash ^= str_hash(tmp);
total_hash ^= str_hash(src->str.str, src->str.size);
}

char* cookie = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/cookie.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

static inline char* gen_cookie(char* path, size_t path_size, char const* ext) {
char* cookie = NULL;
asprintf(&cookie, "%s/bob/%.*s.cookie.%" PRIx64 ".%s", out_path, (int) path_size, path, str_hash(path), ext);
asprintf(&cookie, "%s/bob/%.*s.cookie.%" PRIx64 ".%s", out_path, (int) path_size, path, str_hash(path, path_size), ext);
assert(cookie != NULL);

size_t const prefix_len = strlen(out_path) + strlen("/bob/");
Expand Down
Loading