summaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/depfixer.py
Commit message (Collapse)AuthorAgeFilesLines
* remove unreachable codeMichael Hirsch, Ph.D2019-08-021-3/+2
|
* Fix unused variables warningsDaniel Mensinger2019-04-291-1/+1
|
* Fix blind exceptionsDaniel Mensinger2019-04-291-1/+1
|
* depfixer: Do not try to fix rpaths of dllsMarvin Scholz2018-10-251-0/+3
|
* Do not try to remove duplicate RPATH entries on macOSDavid Seifert2018-10-141-2/+23
|
* java: remove manifest classpath from installed jarNiclas Moeslund Overby2018-07-031-0/+14
|
* macos: Rewrite install_name for dependent built libraries on installNirbheek Chauhan2018-06-181-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.
* depfixer: Rewrite install_name for dylibs on installNirbheek Chauhan2018-06-181-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.
* depfixer: Run install_name_tool only once while deleting rpathsNirbheek Chauhan2018-05-241-2/+5
|
* depfixer: We no longer run this as a scriptNirbheek Chauhan2018-05-241-13/+0
|
* Made depfixer more robust on OSX. Closes #3493.Jussi Pakkanen2018-05-011-4/+10
|
* 🤦🤦🤦Jussi Pakkanen2018-04-141-1/+8
|
* Update depfixer to fix rpaths also on OSX.Jussi Pakkanen2018-04-081-9/+51
|
* Close files reliably.Jussi Pakkanen2017-07-181-0/+5
|
* Use sys.exit rather than plain exit.Jussi Pakkanen2017-07-161-1/+1
|
* Whitespace tweaks to reduce Flake8 warningsAlistair Thomas2017-05-291-1/+1
|
* Use American English: behaviour -> behaviorPeter Hutterer2017-05-041-1/+1
|
* Don't use len() to test emptiness vs not emptinessDylan Baker2017-05-021-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.
* Do not obliterate old rpath because it might be used due to read only data ↵Jussi Pakkanen2017-04-171-3/+12
| | | | sharing. Closes #1619.
* cleanup: Remove redundant parenthesesMike Sinkovsky2017-01-181-2/+2
|
* fix 'unreachable code' warningsMike Sinkovsky2017-01-031-1/+1
|
* style: fix E703 violationsIgor Gnatenko2017-01-011-7/+7
| | | | | | E703: statement ends with a semicolon Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E265 violationsIgor Gnatenko2017-01-011-9/+9
| | | | | | E265: block comment should start with '# ' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* style: fix E226 violationsIgor Gnatenko2017-01-011-12/+12
| | | | | | E226: missing whitespace around arithmetic operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Fix installation of statically linked executable for ELF binary.Matthieu Gautier2016-12-211-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.
* remove shebangs from scriptsIgor Gnatenko2016-12-181-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>
* Fix depfixer on MIPS.Aurelien Jarno2016-10-241-0/+6
|
* Remove shebangs on files that are not runnable and add execute bits to those ↵Jussi Pakkanen2016-10-071-0/+0
| | | | that are.
* Convert depfixer.Elf class into a context manager.Elliott Sales de Andrade2016-08-271-12/+22
| | | | This allows for automatic closing of its internal file handle.
* Handle both DT_RPATH as well as DT_RUNPATH when fixing rpath settings.Jussi Pakkanen2016-08-041-7/+23
|
* Invoke depfixer in-process to make it faster. Closes #480.Jussi Pakkanen2016-03-301-10/+13
|
* Renamed meson package to mesonbuild so that we can have a script named meson ↵Jussi Pakkanen2016-01-161-0/+302
in the same toplevel dir.