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 047ec99 commit 93aaf6b
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 93aaf6b

Please sign in to comment.