Do not link python into python native modules.
In general plugins should not link to a library that can load them, because when
they are loaded the symbols that may be provided by the library are already
defined, and they may be defined by a different library or by the program itself.
@@ -20,7 +20,6 @@ IF (USE_SYSTEM_PYTHON)
GLOBAL "-I$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/include"
GLOBAL "-I$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/include/python${PY_VERSION}"
)
- LDFLAGS("-L$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/lib/x86_64-linux-gnu -lpython${PY_VERSION}")
ELSEIF (OS_DARWIN)
IF (PYTHON_DISTR STREQUAL "macos-brew")
IF (_SYSTEM_PYTHON27)
@@ -42,7 +41,6 @@ IF (USE_SYSTEM_PYTHON)
ENDIF()
ENDIF()
CFLAGS(GLOBAL "-I$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/Python.framework/Versions/${PY_FRAMEWORK_VERSION}/include/python${PY_VERSION}")
- LDFLAGS("-L$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/Python.framework/Versions/${PY_FRAMEWORK_VERSION}/lib -lpython${PY_VERSION}")
ELSEIF (OS_WINDOWS)
IF (_SYSTEM_PYTHON27)
DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON sbr:629001312)
@@ -56,12 +54,10 @@ IF (USE_SYSTEM_PYTHON)
DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON sbr:629042628)
ENDIF()
CFLAGS(GLOBAL "/I$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/include")
- LDFLAGS("/LIBPATH:$EXTERNAL_PYTHON_RESOURCE_GLOBAL/python/libs")
ENDIF()
ELSEIF(NOT USE_ARCADIA_PYTHON)
CFLAGS(GLOBAL $PYTHON_FLAGS)
LDFLAGS_FIXED($PYTHON_LDFLAGS $PYTHON_LIBRARIES)
-
ENDIF()
END()
