Skip to content

Commit 6026dcd

Browse files
committed
Try and fix sandboxing.
1 parent 3949971 commit 6026dcd

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ ifeq ($(BUILDTYPE),)
88
endif
99
export BUILDTYPE
1010

11+
OPTFLAGS = -g -O3
12+
1113
ifeq ($(BUILDTYPE),windows)
1214
MINGW = x86_64-w64-mingw32-
1315
CC = $(MINGW)gcc
1416
CXX = $(MINGW)g++
15-
CFLAGS += -g -O3 \
17+
CFLAGS += \
18+
$(OPTFLAGS) \
1619
-ffunction-sections \
1720
-fdata-sections \
1821
-Wno-attributes \
1922
-Wa,-mbig-obj \
2023
-static
2124
CXXFLAGS += \
25+
$(OPTFLAGS) \
2226
-std=c++23 \
2327
-Wno-deprecated-enum-float-conversion \
2428
-Wno-deprecated-enum-enum-conversion \
@@ -35,16 +39,17 @@ ifeq ($(BUILDTYPE),windows)
3539
PROTOC_SEPARATOR = ;
3640
EXT = .exe
3741

38-
AB_NO_SANDBOX = yes
42+
AB_SANDBOX = no
3943
else
4044
CC = clang
4145
CXX = clang++
42-
CFLAGS = -g -O3 \
46+
CFLAGS = \
47+
$(OPTFLAGS) \
4348
-I/opt/homebrew/include -I/usr/local/include \
4449
-Wno-unknown-warning-option
4550
CXXFLAGS = \
51+
$(OPTFLAGS) \
4652
-std=c++23 \
47-
-g -O3 \
4853
-fexperimental-library \
4954
-I/opt/homebrew/include -I/usr/local/include \
5055
-Wformat \

build/ab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def setdefault(self, name, value):
5555

5656

5757
G = Environment()
58-
G.setdefault("AB_NO_SANDBOX", "")
58+
G.setdefault("AB_SANDBOX", "yes")
5959

6060

6161
class PathFinderImpl(PathFinder):
@@ -559,7 +559,7 @@ def emit_rule(self, ins, outs, cmds=[], label=None):
559559
os.makedirs(self.dir, exist_ok=True)
560560
rule = []
561561

562-
if not G.AB_NO_SANDBOX:
562+
if G.AB_SANDBOX == "yes":
563563
sandbox = join(self.dir, "sandbox")
564564
emit(f"rm -rf {sandbox}", into=rule)
565565
emit(

0 commit comments

Comments
 (0)