Get codebase completely working with LLVM
You can now build Cosmopolitan with Clang:
make -j8 MODE=llvm
o/llvm/examples/hello.com
The assembler and linker code is now friendly to LLVM too.
So it's not needed to configure Clang to use binutils under
the hood. If you love LLVM then you can now use pure LLVM.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "libc/calls/struct/stat.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/nt/console.h"
|
||||
#include "libc/nt/enum/consolemodeflags.h"
|
||||
@@ -58,7 +59,7 @@ static int ttyname_linux(int fd, char *buf, size_t size) {
|
||||
struct stat st1, st2;
|
||||
if (!isatty(fd)) return errno;
|
||||
char name[PATH_MAX];
|
||||
snprintf(name, sizeof(name), "/proc/self/fd/%d", fd);
|
||||
int64toarray_radix10(fd, stpcpy(name, "/proc/self/fd/"));
|
||||
ssize_t got;
|
||||
got = readlink(name, buf, size);
|
||||
if (got == -1) return errno;
|
||||
|
||||
Reference in New Issue
Block a user