Merge pull request #93083 from risicle/ris-cpython-debug
cpython: add separateDebugInfo, allow use of gdb libpython
This commit is contained in:
commit
4b340cbbb4
|
@ -286,6 +286,13 @@ in with passthru; stdenv.mkDerivation {
|
||||||
find $out -name "*.py" | ${pythonForBuildInterpreter} -OO -m compileall -q -f -x "lib2to3" -i -
|
find $out -name "*.py" | ${pythonForBuildInterpreter} -OO -m compileall -q -f -x "lib2to3" -i -
|
||||||
'' + optionalString stripBytecode ''
|
'' + optionalString stripBytecode ''
|
||||||
find $out -type d -name __pycache__ -print0 | xargs -0 -I {} rm -rf "{}"
|
find $out -type d -name __pycache__ -print0 | xargs -0 -I {} rm -rf "{}"
|
||||||
|
'' + ''
|
||||||
|
# *strip* shebang from libpython gdb script - it should be dual-syntax and
|
||||||
|
# interpretable by whatever python the gdb in question is using, which may
|
||||||
|
# not even match the major version of this python. doing this after the
|
||||||
|
# bytecode compilations for the same reason.
|
||||||
|
mkdir -p $out/share/gdb
|
||||||
|
sed '/^#!/d' Tools/gdb/libpython.py > $out/share/gdb/libpython.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
preFixup = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||||
|
@ -303,6 +310,8 @@ in with passthru; stdenv.mkDerivation {
|
||||||
pythonForBuild buildPackages.bash
|
pythonForBuild buildPackages.bash
|
||||||
];
|
];
|
||||||
|
|
||||||
|
separateDebugInfo = true;
|
||||||
|
|
||||||
inherit passthru;
|
inherit passthru;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
Loading…
Reference in New Issue