Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion r/sedonadb/src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ PKG_LIBS = -L$(LIBDIR) -lsedonadbr @PKG_LIBS@

CARGO_BUILD_ARGS = --lib --profile $(PROFILE) $(FEATURE_FLAGS) --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR)

# "-Wno-pedantic" is to override the "-pedantic" flag passed by pkgbuild, which
# makes the compilation of aws-lc-sys fail. Hopefully, such C code will be fixed
# on upstream so that we can remove this.
CFLAGS_TWEAKED = $(CFLAGS) -Wno-pedantic

all: $(SHLIB) clean_intermediate

$(SHLIB): $(STATLIB)
Expand All @@ -40,7 +45,7 @@ $(STATLIB):
# therefore is only used if cargo is absent from the user's PATH.
export PATH="$(PATH):$(HOME)/.cargo/bin" && \
export CC="$(CC)" && \
export CFLAGS="$(CFLAGS)" && \
export CFLAGS="$(CFLAGS_TWEAKED)" && \
export AWS_LC_SYS_CMAKE_BUILDER=1 && \
export RUSTFLAGS="$(RUSTFLAGS)" && \
if [ "$(TARGET)" != "wasm32-unknown-emscripten" ]; then \
Expand Down
12 changes: 4 additions & 8 deletions r/sedonadb/src/Makevars.win.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ CARGO_LINKER = x86_64-w64-mingw32.static.posix-gcc.exe
# cf. https://stackoverflow.com/a/68979087
PKG_CONFIG_SYSROOT_DIR = /x86_64-w64-mingw32.static.posix/

# TODO: should $(CFLAGS) be included here?
# Do not pass -pedantic
CFLAGS_TWEAKED = $(subst -pedantic,,$(ALL_CPPFLAGS))
# "-Wno-pedantic" is to override the "-pedantic" flag passed by pkgbuild, which
# makes the compilation of aws-lc-sys fail. Hopefully, such C code will be fixed
# on upstream so that we can remove this.
CFLAGS_TWEAKED = $(CFLAGS) -Wno-pedantic

all: $(SHLIB) clean_intermediate

Expand All @@ -51,11 +52,6 @@ $(STATLIB):
# in actual, but we need this tweak to please the compiler.
mkdir -p $(LIBDIR)/libgcc_mock && touch $(LIBDIR)/libgcc_mock/libgcc_eh.a

# AWS_LC_SYS_CFLAGS are not ideal: It would be better to use the
# CMake builder but this incurs path length errors on at least one Windows builder.
# The AWS_LC_SYS_CMAKE_BUILDER environment variable can still be set at a
# higher level on Windows environments that support it.

export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$(CARGO_LINKER)" && \
export LIBRARY_PATH="$${LIBRARY_PATH};$(LIBDIR)/libgcc_mock" && \
export PKG_CONFIG_SYSROOT_DIR="$(PKG_CONFIG_SYSROOT_DIR)" && \
Expand Down
Loading