Skip to content

Commit

Permalink
Use flat namespace in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
Baltoli committed Jul 19, 2024
1 parent d628609 commit 3080349
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/llvm-kompile-clang
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ elif [[ "$main" =~ "python" ]]; then
all_libraries=("${libraries[@]}" "-lgmp" "-lgmpxx" "-lmpfr" "-lpthread" "-ldl" "-lffi" "$libunwind")
flags+=("-fPIC" "-shared" "-I${INCDIR}" "-fvisibility=hidden")

if [[ "$OSTYPE" == "darwin"* ]]; then
flags+=("-Wl,-flat_namespace")
fi

read -r -a python_include_flags <<< "$("${python_cmd}" -m pybind11 --includes)"
flags+=("${python_include_flags[@]}")

Expand Down

0 comments on commit 3080349

Please sign in to comment.