Commit Graph

43 Commits

Author SHA1 Message Date
Finagolfin
22833fbc54 [android] Update to LTS NDK 27c
Add a new bits/ header to the Android overlay, include runtime libraries that are
auto-extracted and listed many times to the list of libraries to be de-duplicated,
enable a C++ interop test that's working again, and update the doc with new
libraries that need to be available to run a simple executable.
2024-11-14 00:11:53 +05:30
Ben Barham
d281fb8868 Merge pull request #74883 from finagolfin/droid
[android] Enable several C++ Interop and other tests
2024-07-26 11:18:07 -07:00
LamTrinh.Dev
b6239b8cee [docs] Update links to repositories moved to https://github.com/swiftlang/ 2024-07-22 12:22:43 -07:00
Finagolfin
fb7bb193ea [android][docs] Update NDK/Ubuntu versions and Swift snapshot tag to the latest 2024-07-20 17:56:51 +05:30
Finagolfin
09ef130457 [android] Update to LTS NDK 26c
NDK 26 renamed the directory in which it places the Android compiler-rt from
`lib64/`, and added a bunch of nullability annotations to the Bionic libc.
2024-02-28 22:11:38 +05:30
finagolfin
75bfa4422a [android][test] Fix five tests that are failing on the community Android CI (#69189)
Update the Android doc with info about the latest LTS NDK not working.
2023-10-16 10:44:56 -07:00
finagolfin
58a6bfb82e [build][Android] Skip building Swift Syntax into the compiler (#68895)
The community CI doesn't have a prebuilt Swift compiler right now, so this
unbreaks the build on there. Also, update the doc with the latest working LTS
NDK and trunk snapshot.
2023-10-03 09:25:24 -07:00
Butta
4b22ca1550 [android][test] Fix two C++ Interop tests that were split off for Android, enable two more new ones, and set an executable_test
Also, make some related changes, like updating a path in the Android doc, making sure the
`unknown` vendor is always used, and using `CPU` instead of `CODEGENERATOR`.
2022-11-08 22:13:36 +05:30
buttaface
c4c48c0e84 [android] Update to LTS NDK 25b (#60938)
Also, remove `SWIFT_ANDROID_NDK_CLANG_VERSION` and just extract the
resource directory from the NDK using `file(GLOB)`.
2022-09-21 10:46:29 -07:00
Anthony Latsis
94b1710ab1 docs: Audit references to the old Jira issue tracker 2022-07-16 04:32:45 +03:00
Butta
9d5a7a5877 [android] Update to LTS NDK 23c
Also, switch the build instructions in the doc to the much more common AArch64,
add instructions to cross-compile a standalone stdlib with a prebuilt toolchain,
and add missing Concurrency library and its dependencies to the list of Swift
libraries to copy over.
2022-06-06 21:43:47 +05:30
Butta
26aafe66f6 [android] Fix some tests and a doc flag
Use off_t for a recently failing stdlib test, remove Python hacks for some
tests that now work without them, and correct build flag in the docs.
2022-02-14 03:02:04 +05:30
Butta
a3ea28ff19 [android] Remove ICU build flags since that requirement was dropped in #40340 2021-12-20 12:06:13 +05:30
buttaface
30c292ca87 [android] Update to NDK 23b (#39921)
The latest Long Term Support NDK finally removed binutils, including the bfd/gold
linkers and libgcc. This simplifies our Android support, including making lld the
default linker for Android. Disable three reflection tests that now fail, likely
related to issues with swift-reflection-dump and switching to lld.
2021-11-17 20:58:42 -08:00
Saleem Abdulrasool
15a5d2c54b Revert "[android] Update to NDK 23" 2021-10-16 11:07:23 -07:00
Butta
7fa1b4b2ac [android] Update to NDK 23
The latest Long Term Support NDK finally removed binutils, including the bfd/gold
linkers and libgcc. This simplifies our Android support, including making lld the
default linker for Android. Disable three reflection tests that now fail, likely
related to issues with swift-reflection-dump and switching to lld.

Also, add the libatomic dependency for Android armv7, just as on linux.
2021-10-12 12:37:01 +05:30
FW
1a229578bf [android] Fix Android target name in docs
The target arch name used here is `armv7` rather than `armv7a`.
2021-02-13 19:50:18 +01:00
FW
1f4eabcbf1 [android] Fix lib path in android docs
Point `ARM_DIR` to the output directory containing the libraries.
2021-02-12 19:22:37 +01:00
buttaface
e6f5913772 [android] Move to the NDK's unified sysroot (#34491)
Since the NDK removes the platforms/ and sysroot/ directories in the latest NDK
22, switch to the unified sysroot in toolchains/llvm/ and take advantage of a
bunch of simplification that's now possible.
2021-02-07 09:19:18 -08:00
Butta
1a28a91db9 [android] Switch armv7 vendor to 'unknown' in target triple to match other arches
Recent changes have made 'none' and 'unknown' not interchangeable anymore, so
standardize on 'unknown' for armv7 too.
2020-12-02 11:05:36 +05:30
Butta
e6fe8d47c2 Driver: update old doc comments from when clang++ was the linker driver 2020-06-24 18:38:03 +05:30
Butta
b516d1930a [Docs] [android] Update to the latest NDK 21, fix commands, and remove cruft 2020-01-25 06:12:39 +05:30
swift-ci
c239d7a70e Merge pull request #12530 from amraboelela/update-android-md 2019-11-17 16:38:39 -08:00
Andrew Breckenridge
bcb3fe398f docs/Android: fix typo in build script invocation
@lanza please smoke test
2018-06-27 15:40:58 -07:00
Nathan Lanza
bdf4f02576 Update docs/Android.md 2018-04-11 00:16:09 +00:00
Amr Aboelela
62572e9402 Added Build Android Toolchain section to docs/Android.md 2017-10-22 22:13:56 -07:00
Amr Aboelela
4bf6f5475d Android: adding swift suffix to icu generated libs to resolve conflict with Android's icu libs 2017-08-21 16:17:17 -07:00
Amr Aboelela
fbdc597c50 [docs] Update Android instructions for icu. (#11404)
You will also need to push the icu libraries, to be able to run the "Hello Android" application, in Android devices.
2017-08-11 15:32:19 -07:00
Qasim Iqbal
577913a476 [docs][Android] Update location of Android NDK's libc++ and libgcc 2017-03-30 12:16:54 -07:00
Alex Langford
9f779d49fa Updating Part 1 of Android doc for building on Ubuntu 16.04 LTS 2017-03-09 13:09:06 -08:00
William Dillon
14088f438f Mention that 16.04 also isn't supported. 2016-11-27 07:22:50 -08:00
Brian Gesiak
61868b5aec [CMake] Updates for Android NDK r13
Fixes the Android build, and makes some adjustments for Android NDK r13.

* Fix FindICU.cmake to properly set the `SWIFT_${sdk}_ICU_UC` and
  `SWIFT_${sdk}_ICU_I18N` values. These were not properly set because
  "uc" and "i18n" were lowercase.
* Adapt `add_swift_library` to parse `ICU_UC` and `ICU_I18N` for
  private link libraries and use the proper `SWIFT_${sdk}_ICU_*` values.
* NDK r13 removes a subdirectory from the llvm-libc++ includes path.
  Adapt to this change, and add a FIXME to address this issue before it
  may break again.
* Update the documentation to point to a new libicu download for NDK 13.
2016-10-24 15:17:20 -07:00
Brian Gesiak
e00642fcf5 Merge pull request #3194 from modocache/android-deploy-path-default
[Android] Specify default device deploy path
2016-06-24 13:33:40 -04:00
Brian Gesiak
6c053decd5 [Android] Specify default device deploy path
When the "--android-deploy-device-path" option was first added,
build products would only be deployed to a connected Android device
if the option was specified. Now, we use `command_upload_stdlib`
to upload every time the Android tests are being run.

As a result, running the test suite for Android without specifying
a deploy path leads to a subtle error, in which the
`command_upload_stdlib` CMake command fails. End users may find this
difficult to debug.

Add a default argument to the deployment path, and check for a valid
path before executing the CMake command.
2016-06-24 08:53:07 -07:00
Brian Gesiak
85d7046a63 [docs][Android] Add adb installation instructions
A clean Ubuntu install does not have `adb` installed by default, some
contributors will need to install it first. Add instructions on how to do so.
2016-06-23 13:51:20 -04:00
Brian Gesiak
247f30d168 [Android] Update docs for new NDK r12
The latest Android NDK is r12, update the docs to reflect this.
I've tested the build and can confirm that it works with the new NDK.
2016-06-22 16:54:32 -04:00
Brian Gesiak
ee51b7a6f6 [Android] Add testing support
This adds support for running tests for the stdlib built
for Android, both on the host machine and on an Android device.

The Android variant of Swift may be built and tested using
the following `build-script` invocation:

```
$ utils/build-script \
  -R \                                           # Build in ReleaseAssert mode.
  -T \                                           # Run all tests.
  --android \                                    # Build for Android.
  --android-deploy-device-path /data/local/tmp \ # Temporary directory on the device where Android tests are run.
  --android-ndk ~/android-ndk-r10e \             # Path to an Android NDK.
  --android-ndk-version 21 \
  --android-icu-uc ~/libicu-android/armeabi-v7a/libicuuc.so \
  --android-icu-uc-include ~/libicu-android/armeabi-v7a/icu/source/common \
  --android-icu-i18n ~/libicu-android/armeabi-v7a/libicui18n.so \
  --android-icu-i18n-include ~/libicu-android/armeabi-v7a/icu/source/i18n/
```

See docs/Testing.rst for more details.
2016-06-09 13:03:28 -04:00
Brian Gesiak
4e9c4353d0 [docs][Android] Update libicu download link 2016-04-26 10:55:38 -04:00
Brian Gesiak
d49d88e53d [SR-1264] Fix missing information in Android docs
* Add instructions to symlink the Android linker.
* Make it clear that paths to `android-ndk-r11c` and `libiconv-libicu-android` may be different based on where the user may have downloaded them by prefixing the paths, such as `/path/to/android-ndk-r11c`.
* Link to https://bugs.swift.org/browse/SR-1321 and recommend Ubuntu 15.10 for now.
* Use HTTPS when invoking `git clone`.
2016-04-26 10:48:03 -04:00
Brian Gesiak
2931c21540 [docs] Fix libicu paths for Android
https://bugs.swift.org/browse/SR-1264 identified a problem in the documentation: the `--android-icu-uc` and `--android-icu-i18n` are documented in `utils/build-script` as taking the path to *the directory that contains* the `libcicuuc.so` and `libicui18n.so` libraries, not the paths to the libraries themselves. Passing the path to the libraries themselves causes a build error.

Fix the path to prevent people from encountering an error when copying the build script invocation in the docs.
2016-04-22 12:46:41 -04:00
Brian Gesiak
a7e2329444 [android] Support latest Android NDK r11c
- Update the documentation to reflect that Swift supports (only)
  the latest NDK version. Based on what I've heard from Android
  developers that use the NDK, this is a reasonable requirement.
- The most recent version of the Android NDK no longer includes a
  "4.8" toolchain version. Change the default to "4.9", and update
  the paths in the documentation to match.
- The build script option "--android-ndk-version" was misleading.
  This parameter actually refers to the Android API level. Swift
  currently supports 21 (Android 5.0) and above (although supporting
  lower API levels would be desirable).
2016-04-20 11:20:29 -04:00
yanniks
d9d6705633 [docs][Android] Complete git command 2016-04-17 22:57:18 +02:00
Brian Gesiak
9618fe37b5 [docs][Android] Add a "Getting Started" guide
Until now the best instructions on how to get started with Swift on
Android were in the original pull request. This spruces those up and
places them in the documentation directory.
2016-04-14 21:19:54 -04:00