Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyPy: Fix UB when passing inputs to C #38

Merged
merged 2 commits into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Clean-Up: build.sh logic for -std=...
  • Loading branch information
ax3l committed Jan 18, 2022
commit 440a1608185a22c2f5f1bc180c0e817e9e83e7dc
5 changes: 2 additions & 3 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if errorlevel 1 exit 1

for %%d in (1 2 3 RZ) do (
cmake ^
-S . -B build ^
-S %SRC_DIR% -B build ^
-G "Ninja" ^
-DCMAKE_BUILD_TYPE=RelWithDebInfo ^
-DCMAKE_C_COMPILER=clang-cl ^
Expand All @@ -22,8 +22,7 @@ for %%d in (1 2 3 RZ) do (
-DWarpX_openpmd_internal=OFF ^
-DWarpX_PSATD=ON ^
-DWarpX_QED=ON ^
-DWarpX_DIMS=%%d ^
%SRC_DIR%
-DWarpX_DIMS=%%d
if errorlevel 1 exit 1

cmake --build build --config RelWithDebInfo --parallel 2
Expand Down
20 changes: 5 additions & 15 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
#!/usr/bin/env bash

# find out toolchain C++ standard
CXX_STANDARD=14
# avoid side-injection of -std=c++14 flag in some toolchains
if [[ ${CXXFLAGS} == *"-std=c++14"* ]]; then
echo "14"
CXX_STANDARD=14
elif [[ ${CXXFLAGS} == *"-std=c++17"* ]]; then
echo "17"
CXX_STANDARD=17
elif [[ ${CXXFLAGS} == *"-std="* ]]; then
echo "ERROR: unknown C++ standard in toolchain!"
echo ${CXXFLAGS}
exit 1
echo "14 -> 17"
export CXXFLAGS="${CXXFLAGS} -std=c++17"
fi

# IPO/LTO does only work with certain toolchains
Expand All @@ -23,10 +15,9 @@ fi
for dim in "1" "2" "3" "RZ"
do
cmake \
-S . -B build \
-S ${SRC_DIR} -B build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_CXX_STANDARD=${CXX_STANDARD} \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DWarpX_openpmd_internal=OFF \
Expand All @@ -37,8 +28,7 @@ do
-DWarpX_OPENPMD=ON \
-DWarpX_PSATD=ON \
-DWarpX_QED=ON \
-DWarpX_DIMS=${dim} \
${SRC_DIR}
-DWarpX_DIMS=${dim}

cmake --build build --parallel ${CPU_COUNT}

Expand Down