buildframework/helium/doc/src/manual/stage_compilation.rst.inc.ftl
author wbernard
Fri, 13 Aug 2010 14:59:05 +0300
changeset 628 7c4a911dc066
parent 588 c7c26511138f
permissions -rw-r--r--
helium_11.0.0-e00f171ca185
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     1
<#--
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     2
============================================================================ 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     3
Name        : stage_compilation.rst.inc.ftl
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     4
Part of     : Helium 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     6
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     7
All rights reserved.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     8
This component and the accompanying materials are made available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     9
under the terms of the License "Eclipse Public License v1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    10
which accompanies this distribution, and is available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    11
at the URL "http://www.eclipse.org/legal/epl-v10.html".
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    12
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    13
Initial Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    14
Nokia Corporation - initial contribution.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    15
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    16
Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    17
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    18
Description:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    19
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    20
============================================================================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    21
-->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    22
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    23
.. index::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
  single: Stage - Compilation
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
Stage: Compilation
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
==================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    28
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
Compilation is based on configuration using Symbian System Definition XML files.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
See http://developer.symbian.org/wiki/index.php/System_Definition
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
Every System Definition file can contain content for two separate sections:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
System model
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
    A definition of the system describing the components that exist, broken into layers, modules, etc.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
Build model
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
    Build configurations that define what is to be built and how it will be built. Separate unitLists define groups of components.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
The steps to configure a Helium build for main compilation are as follows:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
1. Put together a list of the System Definition files that define the components needing to be built in the system model sections. This could be one or several files depending on what components need building. They should be defined in an Ant ``<path>`` type with an ``id`` atttribute set to ``system.definition.files``, e.g:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
.. code-block:: xml
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
    <path id="system.definition.files">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
        <fileset dir="${r'$'}{build.drive}/src/common/generic/tools/build" includes="System_Definition*.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
        <pathelement path="${r'$'}{build.drive}/build/ibusal_40_build/ibusal_40/IBUSAL40_System_Definition.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
        <fileset dir="${r'$'}{build.drive}/s60/tools/build_platforms/build/data" includes="S60_System*.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
        <pathelement path="${r'$'}{build.drive}/me/me_scd_desw/sysdef/System_Definition_PRODUCT.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
        <pathelement path="${r'$'}{build.drive}/build/${r'$'}{product.family}_build/_System_Definition.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
    </path>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
The order of the files is significant. If building Symbian OS, the Symbian System Definition file must come first. Here both ``fileset`` and ``pathelement`` are used. ``pathelement`` selects just one file whereas a ``fileset`` can use wildcards to select multiple files or handle problems of filenames changing across different platform releases.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
2. Determine if an existing build configuration in any of the build model sections of the files are suitable for what needs to be built. A build configuration typically looks something like this:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
.. code-block:: xml
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
    <configuration name="foo_config" description="Build foo">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
         <unitListRef unitList="foo_list"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
         <task><buildLayer command="bldmake bldfiles" unitParallel="Y"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
         <task><buildLayer command="abld export" unitParallel="Y"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
         <task><buildLayer command="abld makefile" targetList="default" unitParallel="Y" targetParallel="N"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
         <task><buildLayer command="abld resource" targetList="default" unitParallel="N" targetParallel="N"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
         <task><buildLayer command="abld library" targetList="default" unitParallel="N" targetParallel="N"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
         <task><buildLayer command="abld target" targetList="default" unitParallel="Y" targetParallel="Y"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
         <task><buildLayer command="abld final" targetList="default" unitParallel="N" targetParallel="N"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    70
         <task><buildLayer command="abld -what export" unitParallel="Y"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
         <task><buildLayer command="abld -what target" targetList="default" unitParallel="Y" targetParallel="Y"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    72
         <task><buildLayer command="abld help" unitParallel="Y"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    73
         <task><buildLayer command="abld -check build" targetList="default" unitParallel="Y" targetParallel="Y"/></task>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    74
    </configuration>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    75
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    76
A ``unitListRef`` includes a ``unitList`` defined somewhere else as part of this configuration. The ``buildLayer`` elements define ``abld`` steps to run on each component. If an existing configuration is not sufficient a new one must be defined in a separate file (which should be included in the ``path`` type).
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    77
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    78
3. Define the :hlm-p:`sysdef.configurations.list` Ant property to contain a comma-separated list of build configuration names that must match the ``name`` attribute of the ``configuration`` element. Each configuration will be built in turn in the :hlm-t:`compile-main` Ant target.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    79
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    80
Note: Build will fail if compilation error exceeds the number specified in ``build.errors.limit``. Default value is ``0`` and set it to ``-1`` to ignore this.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    81
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    82
.. index::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    83
  triple: Builds; EBS; EC
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    84
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    85
EBS and EC compilation
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    86
----------------------
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    87
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    88
To switch the compiler version define the ``HLM_RVCT_VERSION`` environment variable (Nokia specific feature)::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    89
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    90
    set HLM_RVCT_VERSION=22_593
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    91
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    92
By default Helium is configured to run EBS builds. The :hlm-p:`build.system` property determines what build system to use. An EC build can be run from the command line using::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    93
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    94
    hlm <build target> -Dbuild.system=ec-helium
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    95
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    96
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    97
An EC build could be configured to run in parallel (default) or in serial mode (1 node build)::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    98
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    99
    hlm <build target> -Dbuild.system=ec-helium -Dec.mode=serial
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   100
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   101
Also the ``--emake-debug`` flag could be configured either by the environment using the ``EMAKE_DEBUG`` variable or using the ``emake_debug_flag`` property. Its default value is ``g``.
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   102
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   103
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   104
Raptor compilation
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   105
------------------
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   106
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   107
Enabling CTC integration
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   108
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   109
   It is possible to enable CTC instrumenting while building with SBSv2. To proceed you need to define the ``ctc.enabled`` to true. If default options are not satisfying (default command line arguments: "-i m"), you can override the ``ctc.instrument.type`` property to define an another instrumentation type. Or if you need to define additional arguments you can then override the argSet referenced by ``ctc.build.options``. 
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   110
   
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   111