aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/depfixer.py
AgeCommit message (Collapse)AuthorFilesLines
2020-09-08typing: fix code reviewDaniel Mensinger1-1/+1
2020-09-08typing: more fixesDaniel Mensinger1-1/+1
2020-09-08typing: fully annotate scriptsDaniel Mensinger1-36/+42
2020-08-30Dedup final install rpath.Jussi Pakkanen1-6/+9
2020-08-07Better log message on rpath error.Jussi Pakkanen1-1/+2
2020-05-16Let .pc files specify rpath.Dan Kegel1-8/+24
Fixes #4027
2020-02-17depfixer: Ignore more extensions that can't need RPATH fixesNirbheek Chauhan1-5/+4
Generated headers, PDB files, import libraries, etc. Speed-up in gst-build on Windows: ``` meson install before: 5.4 seconds after: 5.1 seconds meson install --only-changed before: 2.7 seconds after: 1.6 seconds ```
2020-02-17depfixer: Cache searching of install_name_toolNirbheek Chauhan1-1/+11
This gives a significant speedup in large projects such as gst-build since now we only search for the tool once. Speed-up on Windows: ``` meson install: before: 15.3 seconds after: 5.4 seconds meson install --only-changed: before: 11.6 seconds after: 2.7 seconds ```
2019-11-12Prevent install_name_tool to run on EXE when cross compile on OSXBinh Nguyen1-2/+2
2019-08-02remove unreachable codeMichael Hirsch, Ph.D1-3/+2
2019-04-29Fix unused variables warningsDaniel Mensinger1-1/+1
2019-04-29Fix blind exceptionsDaniel Mensinger1-1/+1
2018-10-25depfixer: Do not try to fix rpaths of dllsMarvin Scholz1-0/+3
2018-10-14Do not try to remove duplicate RPATH entries on macOSDavid Seifert1-2/+23
2018-07-03java: remove manifest classpath from installed jarNiclas Moeslund Overby1-0/+14
2018-06-18macos: Rewrite install_name for dependent built libraries on installNirbheek Chauhan1-2/+5
On macOS, we set the install_name for built libraries to @rpath/libfoo.dylib, and when linking to the library, we set the RPATH to its path in the build directory. This allows all built binaries to be run as-is from the build directory (uninstalled). However, on install, we have to strip all the RPATHs because they point to the build directory, and we change the install_name of all built libraries to the absolute path to the library. This causes the install name in binaries to be out of date. We now change that install name to point to the absolute path to each built library after installation. Fixes https://github.com/mesonbuild/meson/issues/3038 Fixes https://github.com/mesonbuild/meson/issues/3077 With this, the default workflow on macOS matches what everyone seems to do, including Autotools and CMake. The next step is providing a way for build files to override the install_name that is used after installation for use with, f.ex., private libraries when combined with the install_rpath: kwarg on targets.
2018-06-18depfixer: Rewrite install_name for dylibs on installNirbheek Chauhan1-7/+15
The install name is used by consumers of the library to find the library at runtime. If it's @rpath/libfoo.dylib, all consumers must manually add the library path to RPATH, which is not what people expect. Almost everyone sets the library install name as the full path to the library, and this is done at install time with install_name_tool.
2018-05-24depfixer: Run install_name_tool only once while deleting rpathsNirbheek Chauhan1-2/+5
2018-05-24depfixer: We no longer run this as a scriptNirbheek Chauhan1-13/+0
2018-05-01Made depfixer more robust on OSX. Closes #3493.Jussi Pakkanen1-4/+10
2018-04-14🤦🤦🤦Jussi Pakkanen1-1/+8
2018-04-08Update depfixer to fix rpaths also on OSX.Jussi Pakkanen1-9/+51
2017-07-18Close files reliably.Jussi Pakkanen1-0/+5
2017-07-16Use sys.exit rather than plain exit.Jussi Pakkanen1-1/+1
2017-05-29Whitespace tweaks to reduce Flake8 warningsAlistair Thomas1-1/+1
2017-05-04Use American English: behaviour -> behaviorPeter Hutterer1-1/+1
2017-05-02Don't use len() to test emptiness vs not emptinessDylan Baker1-1/+1
Meson has a common pattern of using 'if len(foo) == 0:' or 'if len(foo) != 0:', however, this is a common anti-pattern in python. Instead tests for emptiness/non-emptiness should be done with a simple 'if foo:' or 'if not foo:' Consider the following: >>> import timeit >>> timeit.timeit('if len([]) == 0: pass') 0.10730923599840025 >>> timeit.timeit('if not []: pass') 0.030033907998586074 >>> timeit.timeit('if len(['a', 'b', 'c', 'd']) == 0: pass') 0.1154778649979562 >>> timeit.timeit("if not ['a', 'b', 'c', 'd']: pass") 0.08259823200205574 >>> timeit.timeit('if len("") == 0: pass') 0.089759664999292 >>> timeit.timeit('if not "": pass') 0.02340641999762738 >>> timeit.timeit('if len("foo") == 0: pass') 0.08848102600313723 >>> timeit.timeit('if not "foo": pass') 0.04032287199879647 And for the one additional case of 'if len(foo.strip()) == 0', which can be replaced with 'if not foo.isspace()' >>> timeit.timeit('if len(" ".strip()) == 0: pass') 0.15294511600222904 >>> timeit.timeit('if " ".isspace(): pass') 0.09413968399894657 >>> timeit.timeit('if len(" abc".strip()) == 0: pass') 0.2023209120015963 >>> timeit.timeit('if " abc".isspace(): pass') 0.09571301700270851 In other words, it's always a win to not use len(), when you don't actually want to check the length.
2017-04-17Do not obliterate old rpath because it might be used due to read only data ↵Jussi Pakkanen1-3/+12
sharing. Closes #1619.
2017-01-18cleanup: Remove redundant parenthesesMike Sinkovsky1-2/+2
2017-01-03fix 'unreachable code' warningsMike Sinkovsky1-1/+1
2017-01-01style: fix E703 violationsIgor Gnatenko1-7/+7
E703: statement ends with a semicolon Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E265 violationsIgor Gnatenko1-9/+9
E265: block comment should start with '# ' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E226 violationsIgor Gnatenko1-12/+12
E226: missing whitespace around arithmetic operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-21Fix installation of statically linked executable for ELF binary.Matthieu Gautier1-0/+7
At installation, if the executable is a ELF file, we try to fix the dependencies in the binary section. If a executable has been compiled with the --static flag, there is no .dynamic section in the ELF binary and so we need to handle this case.
2016-12-18remove shebangs from scriptsIgor Gnatenko1-2/+0
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/regen_checker.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_test.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_benchmark.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_exe.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/symbolextractor.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/commandrunner.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/gtkdochelper.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_install.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/depfixer.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/dirchanger.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/delwithsuffix.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/vcstagger.py 644 /usr/bin/python3 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-10-24Fix depfixer on MIPS.Aurelien Jarno1-0/+6
2016-10-07Remove shebangs on files that are not runnable and add execute bits to those ↵Jussi Pakkanen1-0/+0
that are.
2016-08-27Convert depfixer.Elf class into a context manager.Elliott Sales de Andrade1-12/+22
This allows for automatic closing of its internal file handle.
2016-08-04Handle both DT_RPATH as well as DT_RUNPATH when fixing rpath settings.Jussi Pakkanen1-7/+23
2016-03-30Invoke depfixer in-process to make it faster. Closes #480.Jussi Pakkanen1-10/+13
2016-01-16Renamed meson package to mesonbuild so that we can have a script named meson ↵Jussi Pakkanen1-0/+302
in the same toplevel dir.