summaryrefslogtreecommitdiff
path: root/platform/android/detect.py
AgeCommit message (Collapse)Author
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-03-18Removed unused code in android detect.py and SCsubunknown
2020-03-04Compilation fixes on AndroidPouleyKetchoupp
2019-08-27Android: Style fixes to manifest and build.gradleRémi Verschelde
2019-07-30Android: Remove unusable android_stl=no optionRémi Verschelde
As of 3.1 and later, we have too many thirdparty C++ dependencies and some internal uses of `new` and `delete` too for it to make sense to build without the STL on Android. The option has been broken since 3.0, and the "System STL" that we relied on for basic support of `new` and `delete` is likely to be dropped from the NDK: https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md#System-STL
2019-07-30Android: Drop support for NDK < r15Rémi Verschelde
NDK r15c was released over two years ago (July 2017), and we cannot build against r14b anyway as it seems to fail with our setup to link the STL.
2019-07-03SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
2019-06-19Deprecate armv6 support for Androidfhuya
2019-05-20SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools buildRémi Verschelde
Those were disable to keep size small, and on Android avoid the dependency on the STL, but for tools build (editor) this is not really a concern. Note: as of today it's not possible to build tools=yes for those platforms, but this change is one of the necessary steps to enable it. Fixes #25262.
2019-05-13Merge pull request #28518 from clayjohn/GLES2-MSAARémi Verschelde
Added MSAA to GLES2 backend
2019-05-02added MSAA to GLES backendclayjohn
2019-04-30SCons: Always use env.Prepend for CPPPATHRémi Verschelde
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
2019-04-24SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGSRémi Verschelde
Many contributors (me included) did not fully understand what CCFLAGS, CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them in the way they are intended to be. As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html - CCFLAGS: General options that are passed to the C and C++ compilers. - CFLAGS: General options that are passed to the C compiler (C only; not C++). - CXXFLAGS: General options that are passed to the C++ compiler. By default, this includes the value of $CCFLAGS, so that setting $CCFLAGS affects both C and C++ compilation. - CPPFLAGS: User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files [...], but also [...] Fortran [...] and [...] assembly language source file[s]. TL;DR: Compiler options go to CCFLAGS, unless they must be restricted to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to CPPFLAGS.
2019-04-06Remove unused importsHendrikto
2019-03-02SCons: Move platform-specific Opus config to its moduleRémi Verschelde
2019-01-16SCons: Drop unused MPC_FIXED_POINT defineRémi Verschelde
2019-01-16Android: Add support for x86_64 architectureRémi Verschelde
Like arm64v8, this is only supported by API 21 and later, so we enforce 21 as min API for x86_64. Part of #25030.
2019-01-09Don't use -ffast-math or other unsafe math optimizationsHein-Pieter van Braam
Godot supports many different compilers and for production releases we have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers all do slightly different things with -ffast-math and it is causing issues now. See #24841, #24540, #10758, #10070. And probably other complaints about physics differences between release and release_debug builds. I've done some performance comparisons on Linux x86_64. All tests are ran 20 times. Bunnymark: (higher is better) (bunnies) min max stdev average fast-math 7332 7597 71 7432 this pr 7379 7779 108 7621 (102%) FPBench (gdscript port http://fpbench.org/) (lower is better) (ms) fast-math 15441 16127 192 15764 this pr 15671 16855 326 16001 (99%) Float_add (adding floats in a tight loop) (lower is better) (sec) fast-math 5.49 5.78 0.07 5.65 this pr 5.65 5.90 0.06 5.76 (98%) Float_div (dividing floats in a tight loop) (lower is better) (sec) fast-math 11.70 12.36 0.18 11.99 this pr 11.92 12.32 0.12 12.12 (99%) Float_mul (multiplying floats in a tight loop) (lower is better) (sec) fast-math 11.72 12.17 0.12 11.93 this pr 12.01 12.62 0.17 12.26 (97%) I have also looked at FPS numbers for tps-demo, 3d platformer, 2d platformer, and sponza and could not find any measurable difference. I believe that given the issues and oft-reported (physics) glitches on release builds I believe that the couple of percent of tight-loop floating point performance regression is well worth it. This fixes #24540 and fixes #24841
2018-11-20Remove trailing whitespaceRémi Verschelde
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'` (+ manual revert of some thirdparty code under `platform/android`).
2018-10-27Dont use equality operators with None singleton in python fileslupoDharkael
2018-08-28No need to link with libandroid_support in NDK 17Wojciech Milkowski
According to https://github.com/bytedeco/javacpp/pull/244 in NDK 17 libandroid_support library is not needed any more, and on armv8 is already gone which breaks compilation.
2018-08-23Merge pull request #20507 from rdhafidh/android_libcpp_shared_masterRémi Verschelde
add support libc++_shared on android (master)
2018-08-23add support libc++_shared stl on androidRidwan Abdul Hafidh
2018-08-17Update detect.pyTiago Quendera
Fixed a typo in detect.py
2018-07-21-Fix disable_3d flagJuan Linietsky
-Add extra flag optimize=[size,speed] to be able to prioritize size
2017-12-23Fixed android arm64v8Colin Kinloch
2017-12-17Fixed Android NDK unified header detection for python 3Colin Kinloch
2017-11-19Cleanup old references to GLES2 rendererRémi Verschelde
There are still some left in the Android Java code, even stuff to swap between GLES1 and GLES2 support from early Godot days... would be good to see some cleanup there too one day. The "graphics/api" option for Android exports is removed, as only GLES 3.0 is supported. It can be readded when GLES 2.0 support comes back. Fixes #13004.
2017-11-13change matrix and enable caching for Android, iOS and macOS (cross-compile)Rhody Lugo
2017-11-09add missing distutils.version.LooseVersion importRhody Lugo
2017-11-09unified headers fixRhody Lugo
2017-11-08Compile Android with STL enabled by defaultAndreaCatania
2017-11-06add support for Android NDK unified headersRhody Lugo
2017-09-25Use BoolVariable in platform-specific options.Elliott Sales de Andrade
2017-09-25Use BoolVariable for module options.Elliott Sales de Andrade
2017-09-25Use BoolVariable in target/component/advanced options.Elliott Sales de Andrade
2017-09-25Use EnumVariable for choice-based build options.Elliott Sales de Andrade
2017-08-30Make GDNative work on AndroidRuslan Mustakov
The changes include work done to ensure that GDNative apps and Nim integration specifically can run on Android. The changes have been tested on our WIP game, which uses godot-nim and depends on several third-party .so libs, and Platformer demo to ensure nothing got broken. - .so libraries are exported to lib/ folder in .apk, instead of assets/, because that's where Android expects them to be and it resolves the library name into "lib/<ABI>/<name>", where <ABI> is the ABI matching the current device. So we establish the convention that Android .so files in the project must be located in the folder corresponding to the ABI they were compiled for. - Godot callbacks (event handlers) are now called from the same thread from which Main::iteration is called. It is also what Godot now considers to be the main thread, because Main::setup is also called from there. This makes threading on Android more consistent with other platforms, making the code that depends on Thread::get_main_id more portable (GDNative has such code). - Sizes of GDNative API types have been fixed to work on 32-bit platforms.
2017-08-27Make build scripts Python3 compatibleMatthias Hoelzl
- The Windows, UWP, Android (on Windows) and Linux builds are tested with Scons 3.0 alpha using Python 3. - OSX and iOS should hopefully work but are not tested since I don't have a Mac. - Builds using SCons 2.5 and Python 2 should not be impacted.
2017-08-01Merge pull request #9838 from RandomShaper/android-arm64Rémi Verschelde
Add support for ARMv8 (64-bit) on Android
2017-07-25Add support for ARMv8 (64-bit) on AndroidPedro J. Estébanez
2017-07-25Remove ANDROID definePedro J. Estébanez
Fixes GDNative build error on Android. It's also discouraged by Google to rely on it. In case someone needs to check, use ``__ANDROID__`` instead, provided by the very same compiler.
2017-07-20Fix android export templates buildRuslan Mustakov
This commit fixes errors occurring during Android export template builds. This required modification in third-party library (libpng) to compile with NEON. Most likely a similar patch will be applied by them and we could then replace the modified version.
2017-07-01Buildsystem: Improve detect.py readability and fix issuesRémi Verschelde
Tried to organize the configure(env) calls in sections, using the same order for all platforms whenever possible. Apart from cosmetic changes, the following issues were fixed: - Android: cleanup linkage, remove GLESv1_CM and GLESv2 - iPhone: Remove obsolete "ios_gles22_override" option - OSX: * Fix bits detection (default to 64) and remove obsolete "force_64_bits" option (closes #9449) * Make "fat" bits argument explicit - Server: sync with X11 - Windows: clean up old DirectX 9 stuff - X11: * Do not require system OpenSSL for building (closes #9443) * Fix typo'ed use_leak_sanitizer option * Fix .llvm suffix overriding custom extra_suffix
2017-05-27Improve/harmonize mobile buildsPedro J. Estébanez
2017-04-05Fix crash on Android-x86Pedro J. Estébanez
2017-03-26SCons: Add option to toggle warnings (on by default)Rémi Verschelde
All the warnings are factored out of the platform-specific files and moved to SConstruct. Will have to check that it does not introduce regressions on some platforms/compilers. (cherry picked from commit 31107daa1a41fe9ab3c7c1868479e78e16848333)
2017-03-21Export template management dialog.Juan Linietsky
Missing download (need to discuss this!)
2016-11-13Update/fix Android buildPedro J. Estébanez
Fix wrong path for 32-bit Windows, which fixes #7084 Exclude 32-bit Windows from multi-threaded linking because it's not supported by the NDK Remove 32-bit Linux as there is no NDK variant for it
2016-11-03scons: Reorder options for clarityRémi Verschelde
Also prefix all thirdparty-related toggles with `builtin`.