NDK r6 新的特性

來源:互聯網
上載者:User

隨著r5中對native activity的支援,對ndk的關注比較緊,多麼希望對c和c++更多的支援啊。下面是翻譯自ndk的CHANGES.html中對r6的描述。

android-ndk-r6

IMPORTANT CHANGES:
- Official support for the x86 ABI.
  This release of the Android NDK now provides support for the 'x86' ABI.
  This allows you to generate machine code that runs on future x86-based
  Android devices.

  Note that by default, code is still generated for ARM-based devices.
  You can however add 'x86' to your APP_PLATFORM definition in your
  Application.mk. For example, the following line instructs ndk-build
  to build your code for three distinct ABIs:

    APP_ABI := armeabi armeabi-v7a x86

  Unless you rely on ARM-based assembly sources, you shouldn't need to touch
  your Android.mk files to build x86 machine code.

  For all details regarding x86 support, please read the new documentation
  file named docs/CPU-X86.html.

  Don't hesitate to file NDK bugs related to x86 at http://b.android.com

- You can build a standalone x86 toolchain using the --toolchain=x86-4.4.3
  option when calling make-standalone-toolchain.sh. See
  docs/STANDALONE-TOOLCHAIN.html for more details.

- The new 'ndk-stack' tool can be used to translate stack traces
  (as reported by adb logcat in case of crash in native code) into
  something more readable, i.e. containing function / source file /
  line number information corresponding to each stack frame.

  For more information and usage example, see the new documentation
  file docs/NDK-STACK.html

OTHER FIXES & CHANGES:
- The arm-eabi-4.4.0, which had been deprecated since NDK r5, has been
  finally removed from the NDK distribution.

大意如下:

重要的變化:

-官方支援x86 ABI。

新發布的Android NDK 版本 現在提供了對x86 ABI的支援。
這允許你產生的機器碼在未來的基於x86架構的Android裝置上運行。

注意,代碼仍然預設的產生基於ARM的裝置。然而你可以在Application.mk中的APP_PLATFORM定義中添加‘x86’。
例如,下面一行指示ndk-build來構建你的代碼向三種不同的ABI:
 APP_ABI := armeabi armeabi-v7a x86

除非你依賴基於ARM的彙編源,否則你不需要管Android.mk來構建x86機器碼。

關於對x86支援的所有細節,請閱讀新文檔docs目錄下面的CPU-X86.html。

有關x86的bugs,請不用遲疑的歸檔在http://b.android.com
- 你可以構建一個單獨的x86工具鏈,當調用make-standalone-toolchain.sh時使用 --toolchain=x86-4.4.3選項。
  具體細節請看docs/STANDALONE-TOOLCHAIN.html。

- 新的“ndk棧”工具可以翻譯棧的痕迹(在native代碼crash時,adb logcat報告的)更多一些可讀資訊。
  即,包含函數/源檔案/行數資訊相應的每個棧的幀。

  更多資訊和用法樣本,請閱讀新的文檔docs/NDK-STACK.html。

其它 FIXES & CHANGES:
- arm-eabi-4.4.0, 從NDK r5 已經過時(deprecated),已經從NDK分布上永遠的移除了。

       

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.