Skip to content

Commit

Permalink
[FIX] [dbgen] [meta]: use host static library, use
Browse files Browse the repository at this point in the history
  • Loading branch information
0xf104a committed May 3, 2024
1 parent 09029a3 commit 2a20dc8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dbgen/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cc_binary_host {
],
local_include_dirs: ["."],
include_dirs: ["external/Valor/libvalor/include"],
static_libs: ["libvalor"],
static_libs: ["libvalor_host"],
cflags: ["-Wall", "-Wextra"],
target: {
host: {
Expand Down
2 changes: 0 additions & 2 deletions dbgen/src/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@
#define PRINT_FORMATTED(STYLE) \
va_list args; \
va_start(args, format); \
flockfile(stdout); \
printf("\33[2K"); \
printf(STYLE); \
vprintf(format, args); \
printf("\n"); \
funlockfile(stdout); \
va_end(args)

#define PRINT_FORMATTED_NO_NEWLINE(STYLE) \
Expand Down
12 changes: 12 additions & 0 deletions libvalor/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ cc_library {
srcs: ["src/**/*.c"],
local_include_dirs: ["include"],

target: {
host: {
enabled: true
}
}
}

cc_library_host_static {
name: "libvalor",
srcs: ["src/**/*.c"],
local_include_dirs: ["include"],

target: {
host: {
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion libvalor/src/hashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ hashtable_t *hashtbl_create(size_t capacity) {
_tbl->base = (hashtable_node **) malloc(sizeof(hashtable_node * ) * capacity);
_tbl->keys = array_create(1);
_tbl->values = array_create(1);
bzero(_tbl->base, capacity * sizeof(hashtable_node *));
memset(_tbl->base, 0, capacity * sizeof(hashtable_node *));
return _tbl;
}

Expand Down

0 comments on commit 2a20dc8

Please sign in to comment.