Skip to content

Commit e075f5d

Browse files
committed
mostly revert 4b5b9db.
1 parent 3f76e57 commit e075f5d

File tree

6 files changed

+27
-21
lines changed

6 files changed

+27
-21
lines changed

build/TranslateC.zig

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,6 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
190190
try argv_list.append("-o");
191191
try argv_list.append(out_path);
192192

193-
// Aro's non-linux toolchains are not mature enough to find the necessary directories.
194-
if (translate_c.target.result.os.tag != .linux) {
195-
const libc = try std.zig.LibCInstallation.findNative(.{
196-
.target = translate_c.target.result,
197-
.allocator = b.allocator,
198-
});
199-
if (libc.include_dir) |path| {
200-
try argv_list.append("-I");
201-
try argv_list.append(path);
202-
}
203-
if (libc.sys_include_dir) |path| {
204-
try argv_list.append("-isystem");
205-
try argv_list.append(path);
206-
}
207-
}
208-
209193
var child = std.process.Child.init(argv_list.items, b.allocator);
210194
child.cwd = b.build_root.path;
211195
child.cwd_dir = b.build_root.handle;

test/cases/translate/macro_cast.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#include <stdint.h>
1+
// TODO https://github.com/Vexu/arocc/issues/848
2+
// #include <stdint.h>
3+
typedef __UINT32_TYPE__ uint32_t;
4+
25
int baz(void *arg) { return 0; }
36
#define FOO(bar) baz((void *)(baz))
47
#define BAR (void*) a

test/cases/translate/shift_right_assign_with_a_fixed_size_type.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#include <stdint.h>
1+
// TODO https://github.com/Vexu/arocc/issues/848
2+
// #include <stdint.h>
3+
typedef __UINT32_TYPE__ uint32_t;
4+
25
int log2(uint32_t a) {
36
int i = 0;
47
while (a > 0) {

test/cases/translate/simple_data_types.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
#include <stdint.h>
1+
// TODO https://github.com/Vexu/arocc/issues/848
2+
// #include <stdint.h>
3+
typedef __UINT8_TYPE__ uint8_t;
4+
typedef __UINT16_TYPE__ uint16_t;
5+
typedef __UINT32_TYPE__ uint32_t;
6+
typedef __UINT64_TYPE__ uint64_t;
7+
8+
typedef __INT8_TYPE__ int8_t;
9+
typedef __INT16_TYPE__ int16_t;
10+
typedef __INT32_TYPE__ int32_t;
11+
typedef __INT64_TYPE__ int64_t;
12+
213
int foo(char a, unsigned char b, signed char c);
314
int foo(char a, unsigned char b, signed char c); // test a duplicate prototype
415
void bar(uint8_t a, uint16_t b, uint32_t c, uint64_t d);

test/cases/translate/use_cast_param_as_macro_fn_return_type.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#include <stdint.h>
1+
// TODO https://github.com/Vexu/arocc/issues/848
2+
// #include <stdint.h>
3+
typedef __UINT32_TYPE__ uint32_t;
4+
25
#define SYS_BASE_CACHED 0
36
#define MEM_PHYSICAL_TO_K0(x) (void*)((uint32_t)(x) + SYS_BASE_CACHED)
47

test/macros.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ union U {
4242
#define NESTED_COMMA_OPERATOR (1, (2, 3))
4343
#define NESTED_COMMA_OPERATOR_LHS (1, 2), 3
4444

45-
#include <stdint.h>
45+
// TODO https://github.com/Vexu/arocc/issues/848
46+
// #include <stdint.h>
47+
typedef __UINTPTR_TYPE__ uintptr_t;
4648
#if !defined(__UINTPTR_MAX__)
4749
typedef _Bool uintptr_t;
4850
#endif

0 commit comments

Comments
 (0)