Home | History | Annotate | Download | only in html
      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <head>
      4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
      5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
      6 <meta name="generator" content="Doxygen 1.8.5"/>
      7 <title>NDK Programmer&#39;s Guide: x86_64</title>
      8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
      9 <script type="text/javascript" src="jquery.js"></script>
     10 <script type="text/javascript" src="dynsections.js"></script>
     11 <link href="navtree.css" rel="stylesheet" type="text/css"/>
     12 <script type="text/javascript" src="resize.js"></script>
     13 <script type="text/javascript" src="navtree.js"></script>
     14 <script type="text/javascript">
     15   $(document).ready(initResizable);
     16   $(window).load(resizeHeight);
     17 </script>
     18 <link href="doxygen.css" rel="stylesheet" type="text/css" />
     19 </head>
     20 <body>
     21 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
     22 <div id="titlearea">
     23 <table cellspacing="0" cellpadding="0">
     24  <tbody>
     25  <tr style="height: 56px;">
     26   <td style="padding-left: 0.5em;">
     27    <div id="projectname">NDK Programmer&#39;s Guide
     28    </div>
     29   </td>
     30  </tr>
     31  </tbody>
     32 </table>
     33 </div>
     34 <!-- end header part -->
     35 <!-- Generated by Doxygen 1.8.5 -->
     36 </div><!-- top -->
     37 <div id="side-nav" class="ui-resizable side-nav-resizable">
     38   <div id="nav-tree">
     39     <div id="nav-tree-contents">
     40       <div id="nav-sync" class="sync"></div>
     41     </div>
     42   </div>
     43   <div id="splitbar" style="-moz-user-select:none;"
     44        class="ui-resizable-handle">
     45   </div>
     46 </div>
     47 <script type="text/javascript">
     48 $(document).ready(function(){initNavTree('md_3__key__topics__c_p_u__support__c_p_u-_x86-64.html','');});
     49 </script>
     50 <div id="doc-content">
     51 <div class="header">
     52   <div class="headertitle">
     53 <div class="title">x86_64 </div>  </div>
     54 </div><!--header-->
     55 <div class="contents">
     56 <div class="textblock"><h2>Introduction</h2>
     57 <p>Android NDK r10 added support for the '<code>x86_64</code>' ABI, that allows native code to run on Android-based devices running on CPUs supporting the x86-64 instruction set.</p>
     58 <p>The Android x86_64 ABI itself is fully specified in docs/CPU-ARCH-ABIS.html.</p>
     59 <h2>Overview</h2>
     60 <p>Generating machine code is simple: just add 'x86_64' to your APP_ABI definition in your Application.mk file, for example: </p>
     61 <pre class="fragment">    APP_ABI := armeabi armeabi-v7a x86 x86_64
     62 </pre><p>Alternatively, you can use: </p>
     63 <pre class="fragment">    APP_ABI := all
     64 </pre><p>will generate machine code for all supported ABIs with this NDK. Doing so will ensure that your application package contains libraries for all target ABIs. Note that this has an impact on package size, since each ABI will correspond to its own set of native libraries built from the same sources.</p>
     65 <p>The default ABI is still '<code>armeabi</code>', if unspecified in your project.</p>
     66 <p>As you would expect, generated libraries will go into <code>$PROJECT/libs/x86_64/</code>, and will be embedded into your .apk under <code>/lib/x86_64/</code>.</p>
     67 <p>And just like other ABIs, the Android package manager will extract these libraries on a <em>compatible</em> x86-64 based device automatically at install time, to put them under &lt;dataPath&gt;/lib, where &lt;dataPath&gt; is the application's private data directory.</p>
     68 <p>Similarly, the Google Play server is capable of filtering applications based on the native libraries they embed and your device's target CPU.</p>
     69 <p>Debugging with ndk-gdb should work exactly as described under docs/NDK-GDB.html.</p>
     70 <h2>Standalone-toolchain</h2>
     71 <p>It is possible to use the x86-64 toolchain with NDK in stand-alone mode. See docs/STANDALONE-TOOLCHAIN.html for more details. Briefly speaking, it is now possible to run: </p>
     72 <pre class="fragment">  $NDK/build/tools/make-standalone-toolchain.sh --arch=x86_64 --install-dir=&lt;path&gt;
     73 </pre><p>The toolchain binaries have the <code>x86_64-linux-android- prefix</code>.</p>
     74 <h2>Compatibility</h2>
     75 <p>The minimal native API level provided by official Android x86-64 platform builds is the Android L-Preview release, which corresponds to all the native APIs provided by Android API Level L.</p>
     76 <p>You won't have to change anything to your project files if you target an older API level: the NDK build script will automatically select the right set of native platform headers/libraries for you. </p>
     77 </div></div><!-- contents -->
     78 </div><!-- doc-content -->
     79 <!-- start footer part -->
     80 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
     81   <ul>
     82     <li class="footer">Generated on Wed Jun 25 2014 00:51:19 for NDK Programmer&#39;s Guide by
     83     <a href="http://www.doxygen.org/index.html">
     84     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
     85   </ul>
     86 </div>
     87 </body>
     88 </html>
     89