Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed May 9, 2024
2 parents c970ca6 + 1a8d2ea commit fcccc61
Show file tree
Hide file tree
Showing 36 changed files with 5,690 additions and 475 deletions.
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ ifeq (,$(findstring win,$(OS)))
ifneq (osx,$(OS))
NODEFAULTLIB += -L-lpthread -L-lm
endif
else
ifeq ($(MODEL),32omf)
CPPFLAGS := -DNO_snprintf
endif
endif

# Set CC, CC_OUTFILEFLAG and CFLAGS unless using importC
Expand All @@ -142,9 +138,6 @@ ifneq ($(USE_IMPORTC),1)
ifeq ($(OS),win32wine)
CC := wine dmc.exe
CFLAGS := $(if $(findstring $(BUILD),debug),-g,-O)
else ifeq ($(MODEL),32omf)
CC := dmc
CFLAGS := $(if $(findstring $(BUILD),debug),-g,-O)
else ifeq ($(OS),windows)
CC := cl
CC_OUTFILEFLAG := /Fo
Expand Down Expand Up @@ -202,9 +195,7 @@ ifeq (,$(findstring win,$(OS)))
SONAME:=libphobos2.so.$(MAJOR).$(MINOR)
LIBSO:=$(ROOT)/$(SONAME).$(PATCH)
else
ifeq ($(MODEL),32omf)
LIB:=phobos.lib
else ifeq ($(MODEL),32)
ifeq ($(MODEL),32)
LIB:=phobos32mscoff.lib
else
LIB:=phobos$(MODEL).lib
Expand Down
25 changes: 25 additions & 0 deletions changelog/std.process.Config.preExecDelegate.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Add `std.process.Config.preExecDelegate`

$(LINK2 $(ROOT_DIR)phobos/std_process.html#.Config.preExecDelegate, `std.process.Config.preExecDelegate`)
is just like
$(LINK2 $(ROOT_DIR)phobos/std_process.html#.Config.preExecFunction, `std.process.Config.preExecFunction`),
but can capture an environment, for example:

-------
import core.sys.linux.sys.prctl : PR_SET_PDEATHSIG, prctl;
import std.process : Config, execute;

void runProgram(int pdeathsig)
{
execute(
["program"],
config: Config(
preExecDelegate: () @trusted =>
prctl(PR_SET_PDEATHSIG, pdeathsig, 0, 0, 0) != -1,
),
);
}
-------

`preExecFunction` is retained for backwards compatibility. If both
`preExecFunction` and `preExecDelegate` are given, both are called.
4 changes: 2 additions & 2 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ copyright "Copyright © 1999-2024, The D Language Foundation"

configuration "library" {
targetType "staticLibrary"
sourcePaths "lib"
sourcePaths "phobos"
targetPath "generated-lib"
#excludedSourceFiles "unittest.d" "test/**" "std/**" "tools/**" "etc/**"
}

configuration "unittest" {
dflags "-main"
targetType "executable"
sourcePaths "lib"
sourcePaths "phobos"
targetPath "generated-lib"
#excludedSourceFiles "unittest.d" "test/**" "std/**" "tools/**" "etc/**"
}
3 changes: 0 additions & 3 deletions lib/package.d

This file was deleted.

149 changes: 0 additions & 149 deletions lib/sys/meta.d

This file was deleted.

4 changes: 0 additions & 4 deletions lib/sys/package.d

This file was deleted.

4 changes: 2 additions & 2 deletions lib/sys/compiler.d → phobos/sys/compiler.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* Copyright: Copyright The D Language Foundation 2000 - 2011.
* License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
* Authors: $(HTTP digitalmars.com, Walter Bright), Alex Rønne Petersen
* Source: $(PHOBOSSRC std/compiler.d)
* Source: $(PHOBOSSRC phobos/sys/compiler.d)
*/
/* Copyright The D Language Foundation 2000 - 2011.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
module lib.sys.compiler;
module phobos.sys.compiler;

immutable
{
Expand Down
Loading

0 comments on commit fcccc61

Please sign in to comment.