File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ PKG_LIBS = -L$(LIBDIR) -lsedonadbr @PKG_LIBS@
3030
3131CARGO_BUILD_ARGS = --lib --profile $(PROFILE) $(FEATURE_FLAGS) --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR)
3232
33+ # "-Wno-pedantic" is to override the "-pedantic" flag passed by pkgbuild, which
34+ # makes the compilation of aws-lc-sys fail. Hopefully, such C code will be fixed
35+ # on upstream so that we can remove this.
36+ CFLAGS_TWEAKED = $(CFLAGS) -Wno-pedantic
37+
3338all: $(SHLIB) clean_intermediate
3439
3540$(SHLIB): $(STATLIB)
@@ -40,7 +45,7 @@ $(STATLIB):
4045 # therefore is only used if cargo is absent from the user's PATH.
4146 export PATH="$(PATH):$(HOME)/.cargo/bin" && \
4247 export CC="$(CC)" && \
43- export CFLAGS="$(CFLAGS )" && \
48+ export CFLAGS="$(CFLAGS_TWEAKED )" && \
4449 export AWS_LC_SYS_CMAKE_BUILDER=1 && \
4550 export RUSTFLAGS="$(RUSTFLAGS)" && \
4651 if [ "$(TARGET)" != "wasm32-unknown-emscripten" ]; then \
Original file line number Diff line number Diff line change @@ -37,9 +37,10 @@ CARGO_LINKER = x86_64-w64-mingw32.static.posix-gcc.exe
3737# cf. https://stackoverflow.com/a/68979087
3838PKG_CONFIG_SYSROOT_DIR = /x86_64-w64-mingw32.static.posix/
3939
40- # TODO: should $(CFLAGS) be included here?
41- # Do not pass -pedantic
42- CFLAGS_TWEAKED = $(subst -pedantic,,$(ALL_CPPFLAGS))
40+ # "-Wno-pedantic" is to override the "-pedantic" flag passed by pkgbuild, which
41+ # makes the compilation of aws-lc-sys fail. Hopefully, such C code will be fixed
42+ # on upstream so that we can remove this.
43+ CFLAGS_TWEAKED = $(CFLAGS) -Wno-pedantic
4344
4445all: $(SHLIB) clean_intermediate
4546
@@ -51,11 +52,6 @@ $(STATLIB):
5152 # in actual, but we need this tweak to please the compiler.
5253 mkdir -p $(LIBDIR)/libgcc_mock && touch $(LIBDIR)/libgcc_mock/libgcc_eh.a
5354
54- # AWS_LC_SYS_CFLAGS are not ideal: It would be better to use the
55- # CMake builder but this incurs path length errors on at least one Windows builder.
56- # The AWS_LC_SYS_CMAKE_BUILDER environment variable can still be set at a
57- # higher level on Windows environments that support it.
58-
5955 export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$(CARGO_LINKER)" && \
6056 export LIBRARY_PATH="$${LIBRARY_PATH};$(LIBDIR)/libgcc_mock" && \
6157 export PKG_CONFIG_SYSROOT_DIR="$(PKG_CONFIG_SYSROOT_DIR)" && \
You can’t perform that action at this time.
0 commit comments