Skip to content

Commit

Permalink
turn phobos external dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Jul 30, 2024
1 parent 3352ea4 commit f51db87
Show file tree
Hide file tree
Showing 223 changed files with 225 additions and 372,200 deletions.
392 changes: 196 additions & 196 deletions build.zig

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.{
.name = "druntime",
.version = "1.109.0",
.version = "1.109.1",
.dependencies = .{
.abs = .{
.url = "git+https://github.com/kassane/anotherBuildStep#449e179e966ba95b8a2308a9982cde490b57b3d3",
.hash = "12209e13ee461f2636956b46c663b17305a990338d02a8a70182043ff3a3a7a11356",
},
.phobos = .{
.url = "git+https://github.com/ldc-developers/phobos#654241bed8f1b1460762e55412d9a9ea623f3cc7",
.hash = "1220411abc293322e196fd3a832363c5d9a1aa82a68061d343c1d20b406588218a04",
},
},
.paths = .{""},
}
53 changes: 24 additions & 29 deletions druntime/src/importc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#define __IMPORTC__ 1

/********************
* Some compilers define `__restrict` instead of `restrict` as C++ compilers
* don't recognize `restrict` as a keyword. ImportC assigns no semantics to
* `restrict`, so just ignore the keyword.
* Some compilers define `__restrict` instead of `restrict` as C++ compilers don't
* recognize `restrict` as a keyword.
* ImportC assigns no semantics to `restrict`, so just ignore the keyword.
*/
#define __restrict
#define __restrict__
Expand Down Expand Up @@ -57,7 +57,7 @@

#define __forceinline
#undef _Check_return_
// #define _Check_return_
//#define _Check_return_
#define __pragma(x)

#undef _GLIBCXX_USE_FLOAT128
Expand Down Expand Up @@ -94,12 +94,12 @@ typedef unsigned long long __uint64_t;
* __extension__ is a GNU C extension. It suppresses warnings
* when placed before an expression.
*/
#define __extension__ /* ignore it, as ImportC doesn't do warnings */
#define __extension__ /* ignore it, as ImportC doesn't do warnings */

#define __builtin_isnan(x) isnan(x)
#define __builtin_isfinite(x) finite(x)
// IN_LLVM: replaced by symbol in __importc_builtins.di
// #define __builtin_alloca(x) alloca(x)
//#define __builtin_alloca(x) alloca(x)

/********************************
* __has_extension is a clang thing:
Expand All @@ -116,24 +116,20 @@ typedef unsigned long long __uint64_t;
* OS-specific macros
*/
#if __APPLE__
#define __builtin___memmove_chk(dest, src, len, x) \
memmove(dest, src, len) // put it back to memmove()
#define __builtin___memcpy_chk(dest, src, len, x) memcpy(dest, src, len)
#define __builtin___memset_chk(dest, val, len, x) memset(dest, val, len)
#define __builtin___stpcpy_chk(dest, src, x) stpcpy(dest, src)
#define __builtin___stpncpy_chk(dest, src, len, x) stpncpy(dest, src, len)
#define __builtin___strcat_chk(dest, src, x) strcat(dest, src)
#define __builtin___strcpy_chk(dest, src, x) strcpy(dest, src)
#define __builtin___strncat_chk(dest, src, len, x) strncat(dest, src, len)
#define __builtin___strncpy_chk(dest, src, len, x) strncpy(dest, src, len)
#define __builtin___sprintf_chk(s, flag, os, fmt, ...) \
sprintf(s, fmt, __VA_ARGS__)
#define __builtin___snprintf_chk(s, c, flag, os, fmt, ...) \
snprintf(s, c, fmt, __VA_ARGS__)
#define __builtin___vsnprintf_chk(s, c, flag, os, fmt, ...) \
vsnprintf(s, c, fmt, __VA_ARGS__)
#define __builtin___strlcat_chk(dest, src, x, n) strlcat(dest, src, x)
#define __builtin___strlcpy_chk(dest, src, x, n) strlcpy(dest, src, x)
#define __builtin___memmove_chk(dest, src, len, x) memmove(dest,src,len) // put it back to memmove()
#define __builtin___memcpy_chk(dest, src, len, x) memcpy(dest,src,len)
#define __builtin___memset_chk(dest, val, len, x) memset(dest,val,len)
#define __builtin___stpcpy_chk(dest, src, x) stpcpy(dest,src)
#define __builtin___stpncpy_chk(dest, src, len, x) stpncpy(dest,src,len)
#define __builtin___strcat_chk(dest, src, x) strcat(dest,src)
#define __builtin___strcpy_chk(dest, src, x) strcpy(dest,src)
#define __builtin___strncat_chk(dest, src, len, x) strncat(dest,src,len)
#define __builtin___strncpy_chk(dest, src, len, x) strncpy(dest,src,len)
#define __builtin___sprintf_chk(s, flag, os, fmt, ...) sprintf(s, fmt, __VA_ARGS__)
#define __builtin___snprintf_chk(s, c, flag, os, fmt, ...) snprintf(s, c, fmt, __VA_ARGS__)
#define __builtin___vsnprintf_chk(s, c, flag, os, fmt, ...) vsnprintf(s, c, fmt, __VA_ARGS__)
#define __builtin___strlcat_chk(dest, src, x, n) strlcat(dest,src,x)
#define __builtin___strlcpy_chk(dest, src, x, n) strlcpy(dest,src,x)
#define __builtin_object_size
#define __signed signed
#endif
Expand All @@ -156,24 +152,23 @@ typedef unsigned long long __uint64_t;

// This header disables the Windows API Annotations macros
// Need to include sal.h to get the pragma once to prevent macro redefinition.
#include "no_sal2.h"
#include "sal.h"
#include "no_sal2.h"
#endif

/****************************
* Define it to do what other C compilers do.
*/
#define __builtin_offsetof(t, i) \
((typeof(sizeof(0)))((char *)&((t *)0)->i - (char *)0))
#define __builtin_offsetof(t,i) ((typeof(sizeof(0)))((char *)&((t *)0)->i - (char *)0))

#define __builtin_bit_cast(t, e) (*(t *)(void *)&(e))
#define __builtin_bit_cast(t,e) (*(t*)(void*)&(e))

/***************************
* C11 6.10.8.3 Conditional feature macros
*/
#define __STDC_NO_VLA__ 1

#if linux // Microsoft won't allow the following macro
#if linux // Microsoft won't allow the following macro
// Ubuntu's assert.h uses this
#define __PRETTY_FUNCTION__ __func__

Expand Down
1 change: 0 additions & 1 deletion druntime/src/rt/sections_ldc.d
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ else version (OpenBSD) {}
else version (Windows) {}
else version (LDC):

import core.stdc.stdlib : alloca;
import rt.minfo;
debug(PRINTF) import core.stdc.stdio : printf;

Expand Down
37 changes: 0 additions & 37 deletions phobos/README.md

This file was deleted.

42 changes: 0 additions & 42 deletions phobos/changelog/README.md

This file was deleted.

25 changes: 0 additions & 25 deletions phobos/changelog/std.process.Config.preExecDelegate.dd

This file was deleted.

Loading

0 comments on commit f51db87

Please sign in to comment.