aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/build_commands.py
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #29970 - mrobinson:remove-uwp, r=jdmbors-servo2023-07-051-152/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove UWP / Hololens support <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they remove a feature. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Remove UWP / Hololens supportMartin Robinson2023-07-051-152/+30
| |
* | Collect android build setup into two methodsMartin Robinson2023-07-051-204/+53
|/ | | | | | | | | | This is small refactor which tries to isolate all of the Android setup into a couple methods, so that it is easier to reason about in the scripts. This doesn't change any behavior but does fix a few small linting errors in the existing code. Note: The Android build is currently broken and this change doesn't fix it. It shouldn't break it any more though.
* Windows bootstrap supportMartin Robinson2023-07-031-3/+3
|
* Set the Windows subsystem using a rust directiveMartin Robinson2023-07-011-5/+0
| | | | This is one less thing that mach has to do now.
* Update mozangle, cc, and cmakeMartin Robinson2023-06-301-5/+0
| | | | | | | | | This also moves some environment variable configuration to the shared `build_env()` method, because previously clang was only being chosen for running `./mach build` and not `./mach test-unit` which was leading to rebuilds and thus build failures when running `test-unit`. I guess the cmake crate does not expect the compiler to change between subsequent runs.
* Collect build timings on GitHub CIMartin Robinson2023-06-231-3/+1
| | | | This will help to investigate slow builds on GitHub.
* Only check the GStreamer installation when buildingMartin Robinson2023-05-271-1/+1
| | | | | | | | | Instead of always checking whether GStreamer is installed in mach's `build_env`, only do this when actually building. Also, use the instance variable to find features and look for the "media-gstreamer" feature instead of looking for !"media-dummy." Fixes #29797.
* Clean up cross-compilation and featuresMartin Robinson2023-05-251-49/+28
| | | | | | | | | | | | Integrate cross-compilation and media-stack handling into the `build_like_command_arguments` decorator. This removes a lot of repetition in the code and standardizes how targets are selected for all similar commands. Now cross compilation targets, feature flags, and helper variables are stored in the CommandBase instance. This also avoids having to continuously pass these arguments down to functions called by the commands.
* Implement `bootstrap-gstreamer` for all platformsMartin Robinson2023-05-251-16/+16
| | | | | | | | | | | | | | | | | | This change makes it so that the Platform classes can now handle installing GStreamer dependencies and properly setting up the environment including when cross-compiling. For Windows and Linux is now installed into `target/dependencies/gstreamer` when not installed system-wide. In addition: 1. Creating and moving existing environment path append helpers to `util.py`. 2. Combining the `set_run_env` and `build_dev` functions and moving some outside code into them so that it can be shared. Now code that used to call `set_run_env` calls `build_dev` and then `os.environ.update(...)`. 3. Adding Python typing information in many places. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Removed MagicLeap occurrences from Python filesmichaelgrigoryan252023-05-221-121/+4
|
* Count post-cargo build steps in elapsed timeMukilan Thiyagarajan2023-05-211-2/+1
|
* Print message when packaging macos dylibsMukilan Thiyagarajan2023-05-211-0/+1
|
* Avoid relinking plugin dylibsMukilan Thiyagarajan2023-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | The `copy_dependencies` logic is invoking `change_non_system_libraries_path` with absolute paths to gstreamer *plugin dylibs*. `change_non_system_libraries_path` skips editing links in servo binary to relocatable dylibs, but the since the plugins have absolute paths, they are treated as 'non-relocable' and it will try to edit the *non-existent* (since plugins are loaded dynamically) link in servo bin. These unnecessary calls to change_link_name is cause of the slowness identified in #29764 This PR fixes the issue by ensuring plugins are not included in the call to change_non_system_libraries_path Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
* Start organizing platform-specific Python codeMartin Robinson2023-05-191-1/+1
| | | | | | This starts to split platform-specific Python code into its own module, which should help to tidy up our mach commands and make things more reusable.
* Workaround bug in gstreamer binariesMukilan Thiyagarajan2023-05-121-0/+11
| | | | | | | | | | | | | | | | The official gstreamer .pkg distribution should contain 'relocatable' dylibs, but as discovered in #29732, some dylibs have absolute links to liblzma.5.dylibs Since /opt/homebrew is the default install location on Apple Silicion, this will cause the packaging & build steps to fail, even if 'xz' package is installed via homebrew. This is a temporary fix until upstream fixes the bug and makes the package truly 'relocatable'. Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
* Consume official GStreamer binaries on MacOSMukilan Thiyagarajan2023-05-121-22/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR re-enables support for the gstreamer mediastack in macOS by consuming the official binary '.pkg' files from gstreamer.freedesktop.org To maintain symmetry with other platforms, the '.pkg' files are uploaded to servo-build-deps and fetched from there using the new script 'etc/install_macos_gstreamer.sh'. Unlike the Homebrew version, the official GStreamer is distributed as a 'relocatable' framework i.e the dylibs all have @rpath-relative install names and also link to other dylibs using @rpath relative path. To address this difference the 'servo' binary needs to be patched with 'install_name_tool' to add an LC_RPATH command that sets the relative paths that the dynamic linker should search when trying to satify dependencies. In Servo's case, this will be a path relative to the 'servo' binary itself i.e '@executable_path/lib/' The additional 'lib' is due to a flaw in the gstreamer packaging where the install names of some of the dylibs have the prefix '@rpath/lib' and some of them just have '@rpath'. This PR also fixes a couple of issues present in the `mach build` process on MacOS: 1. `mach build` process was not copying transitive dependencies of servo binary but only the first level dylibs 2. `mach build` process didn't patch the links to dylibs in servo binary (and dependencies). This meant though (some) dylibs were copied to local path, the binary still loaded the dylibs from system GStreamer installation i.e homebrew instead of the copieds dylibs The build and runtime dependencies in etc/homebrew/Brewfile and etc/homebrew/Brewfile-build have also been removed in This PR. Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
* Catch more exceptions when delivering build notificationsMartin Robinson2023-04-201-3/+2
| | | | | | | It seems that catching ImportError isn't enough, so we must catch any type of exception when trying to deliver a build notification. Fixes #29645.
* Make errors during build status notification warningsMartin Robinson2023-04-171-2/+5
| | | | | | | Instead of raising an exception, simply print a warning on stderr when notification fails. Fixes #29635.
* Auto merge of #29610 - mrobinson:notify, r=mukilanbors-servo2023-04-131-109/+53
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use notify-py to send notifications - Use notify-py to send notifications, but use a custom notifier on Linux since transient (ie non-sticky) notifications are not supported. - Add an icon to the notification. - Don't send a notification after doing `./mach check` because that can trigger notifications when `rust-analyzer` is working. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they just change build notifications. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Use notify-py to send notificationsMartin Robinson2023-04-131-109/+53
| | | | | | | | | | | | | | | | - Use notify-py to send notifications, but use a custom notifier on Linux since transient (ie non-sticky) notifications are not supported. - Add an icon to the notification. - Don't send a notification after doing `./mach check` because that can trigger notifications when `rust-analyzer` is working.
* | Replace usage of six.moves.urllib with urllibMartin Robinson2023-04-101-2/+2
|/ | | | | | Also organize some of the imports. Now that Servo only uses Python 3, this module is unnecessary. This is part of the gradual migration to using only Python 3.
* Update rustc to 3/6 nightly.Josh Matthews2022-03-061-1/+1
|
* docs: clarify 'clean' commandFlorian-Schoenherr2021-08-211-2/+2
| | | | Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>
* Auto merge of #27865 - servo:github-actions-dev, r=jdmbors-servo2021-03-111-14/+9
|\ | | | | | | Add Github Actions workflow for mac/linux/windows builds
| * Ensure clang-cl is always used in windows builds.Josh Matthews2021-02-261-9/+1
| |
| * Don't package gstreamer when it's disabled.Josh Matthews2021-02-261-5/+8
| |
* | Use build-std instead of xargo.Josh Matthews2021-02-251-1/+0
|/
* Use new S3 bucketsSimon Sapin2020-11-111-2/+2
| | | | CC https://github.com/servo/project/issues/25
* Ignore UWP restrictions for host binaries.Josh Matthews2020-07-301-4/+4
|
* Add more gstreamer plugins to nightly builds.Josh Matthews2020-07-271-0/+3
|
* Load explicit set of gstreamer plugins on macos, and include them in the ↵Josh Matthews2020-07-161-54/+30
| | | | nightly package.
* Update Servo logo filesAlex Touchet2020-06-291-1/+1
|
* Use except Exception where Py2/3 disagreesKagami Sascha Rosylight2020-06-211-2/+2
|
* Fix new flake8 warningsKagami Sascha Rosylight2020-06-201-4/+4
|
* Fix Py3 environment setting failuresKagami Sascha Rosylight2020-06-201-1/+4
|
* Add VCINSTALLDIR to the 'do not run within vcvarsall' checkManish Goregaokar2020-04-161-2/+3
|
* Report error when vcvarsall failsManish Goregaokar2020-04-161-1/+5
|
* implement mach clean-uwpPaul Rouget2020-04-081-9/+19
|
* Auto merge of #25365 - MeFisto94:autolaunch-vcvars, r=jdmbors-servo2020-03-231-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | Launch vcvarsall.bat for the recognized VS Installation Directory from python instead of making mach.bat try that on hardcoded paths. Move the Execution of vcvars (which sets up the environment for visual studio tools) from mach.bat to python, so that ./mach works under mozilla-build and that #25300 can be used. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25360 #25336 - [X] These changes do not require tests because changes to build infra
| * Launch vcvarsall.bat for the recognized VS Installation Directory from ↵MeFisto942019-12-231-0/+11
| | | | | | | | python instead of making mach.bat try that on hardcoded paths.
* | Copy openssl DLLs to unit test directory.Josh Matthews2020-03-171-4/+5
| |
* | Synchronize ANGLE linking path with VS project.Josh Matthews2020-02-201-2/+14
| |
* | Auto merge of #25736 - Darkspirit:ossl, r=jdmbors-servo2020-02-141-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add OpenSSL 1.1.1 build check, Update HSTS Preload list * This variant also works with cross-compilation. PR should fail in CI on Android at first: The net crate successfully compiled after switching to OpenSSL 1.1.1 on Android. It seemed openssl.sh doesn't need any changes.(?) * Updated HSTS preload list and public suffix list. * Configured OpenSSL [SECLEVEL=2](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html) like [Debian](https://wiki.debian.org/ContinuousIntegration/TriagingTips/openssl-1.1.1) Stable: > As a result RSA, DSA and DH keys shorter than [2048 bits](https://github.com/cabforum/documents/blob/16a5a9bb78a193266f8d1465de1ee5a1acf5d184/docs/BR.md#6153-subscriber-certificates) and ECC keys shorter than 224 bits are prohibited. * Although all other crates compile I generally get a `libscript-fe019dd3e0a4e06d.rlib: bad extended name index at 8` error on simpleservo_jniapi, I guess Debian Testing is too new and I just haven't found the right steps so far. ./mach build -d --android ``` = note: /home/darkspirit/github/servo/android-toolchains/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: /home/darkspirit/github/servo/target/android/armv7-linux-androideabi/debug/deps/libscript-fe019dd3e0a4e06d.rlib: bad extended name index at 8 clang: error: linker command failed with exit code 1 (use -v to see invocation) toolchain: /home/darkspirit/github/servo/android-toolchains/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin libs dir: /home/darkspirit/github/servo/android-toolchains/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a sysroot: /home/darkspirit/github/servo/android-toolchains/ndk/platforms/android-21/arch-arm targetdir: /home/darkspirit/github/servo/target/android/armv7-linux-androideabi/debug/build/simpleservo_jniapi-26ef18debb5b3630/out/../../.. ``` - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25708, fix #25619.
| * | Switch Android to OpenSSL 1.1.1dJan Andre Ikenmeyer2020-02-121-2/+2
| | |
* | | Build: check for VC142 MSVC redist dirRobert Bragg2020-02-111-1/+1
|/ /
* | Revert "Auto merge of #25509 - jdm:angle-up, r=asajeffrey"Josh Matthews2020-02-101-1/+1
| | | | | | | | | | This reverts commit ce6204b904e62307915e0870611bad473cd48843, reversing changes made to 904fcb4317ffd0f1ed6d0400cdb768fedacfda3d.
* | Update ANGLE for UWP build.Josh Matthews2020-01-131-1/+1
| |
* | mach: run `rustup target add` in `ensure_bootstrapped`Simon Sapin2020-01-021-9/+1
| |
* | Mach: rename default_toolchain to rust_toolchainSimon Sapin2020-01-021-1/+1
|/