Application of review comments.
--- a/sbsv2/raptor/lib/config/rvct.xml Tue Mar 30 15:34:13 2010 +0100
+++ b/sbsv2/raptor/lib/config/rvct.xml Thu Apr 01 10:50:16 2010 +0100
@@ -101,6 +101,6 @@
<set name="USER_LIBS_PATH_OPTION" value="--userlibpath"/>
<set name="VFE_OPTION" value="--no_vfe"/>
<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
- <set name="USE_RVCT22_DELETE_HACK" value=""/>
+ <set name="USE_RVCT22_DELETE_WORKAROUND" value=""/>
</var>
</build>
--- a/sbsv2/raptor/lib/config/variants.xml Tue Mar 30 15:34:13 2010 +0100
+++ b/sbsv2/raptor/lib/config/variants.xml Thu Apr 01 10:50:16 2010 +0100
@@ -139,7 +139,7 @@
<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
<set name="CC.ARMV5" value="--cpu 5T"/>
<set name="CC.ARMV6" value="--cpu 6"/>
- <set name="USE_RVCT22_DELETE_HACK" value="1" />
+ <set name="USE_RVCT22_DELETE_WORKAROUND" value="1" />
</var>
<var name="rvct3_1" extends="rvct">
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm Tue Mar 30 15:34:13 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Thu Apr 01 10:50:16 2010 +0100
@@ -798,7 +798,7 @@
$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(1).d)) \
$(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \
$(if $(MULTIFILE_ENABLED),--multifile $(OUTPUT_OPTION) $(MULTIFILEOBJECT) \
- --via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) $(if $(USE_RVCT22_DELETE_HACK),$(RVCT22_DELETE_HACK)) \
+ --via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,compile)
ifeq ($(NO_DEPEND_GENERATE),)
@@ -857,7 +857,7 @@
$(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(USERINCLUDE))) \
$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE))) \
$(if $(NOHIDEALL),--no_hide_all,) \
- $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_HACK),$(RVCT22_DELETE_HACK)) \
+ $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,e32cpponly)
CLEANTARGETS:=$$(CLEANTARGETS) $(CPPONLYTARGET)
@@ -892,7 +892,7 @@
$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE))) \
$(if $(NOHIDEALL),--no_hide_all,) \
$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
- $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_HACK),$(RVCT22_DELETE_HACK)) \
+ $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,e32listing)
CLEANTARGETS:=$$(CLEANTARGETS) $(LISTINGTARGET)
@@ -987,7 +987,7 @@
$(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS) $(CIADEFS)) $(CPP_LANG_OPTION) \
$(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(USERINCLUDE))) \
$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(SYSTEMINCLUDE))) \
- $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_HACK),$(RVCT22_DELETE_HACK)) \
+ $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,cia2cpp2o)
@@ -1013,7 +1013,7 @@
$(e32abiv2_PREFILE): $1 $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
$(call startrule,cia2cpp,,$1) \
$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
- $(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) $(if $(USE_RVCT22_DELETE_HACK),$(RVCT22_DELETE_HACK)) \
+ $(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(if $(NO_DEPEND_GENERATE),,&& $(CC) -M $(e32abiv2_PREFILE_OPTIONS) --depend_format=unix $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) > $(call dblquote,$(e32abiv2_PREFILE).d)) \
$(call endrule,cia2cpp)
@@ -1058,12 +1058,12 @@
$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
$(CC) $(e32abiv2_asm_OPTIONS) \
$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
- $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_HACK),$(RVCT22_DELETE_HACK)) \
+ $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,asmcompile)
ifeq ($(NO_DEPEND_GENERATE),)
$(call startrule,asmdependencies) \
$(CC) -M $(subst --no_rtti,,$(e32abiv2_asm_OPTIONS)) --depend_format=unix \
- $(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) $(if $(USE_RVCT22_DELETE_HACK),$(RVCT22_DELETE_HACK)) \
+ $(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
$(call endrule,asmdependencies)
endif
--- a/sbsv2/raptor/lib/flm/globals.mk Tue Mar 30 15:34:13 2010 +0100
+++ b/sbsv2/raptor/lib/flm/globals.mk Thu Apr 01 10:50:16 2010 +0100
@@ -54,7 +54,7 @@
# Enable DELETE_ON_FAILED_COMPILE work around for failed RVCT 2.2 compiles
ifneq ($(DELETE_ON_FAILED_COMPILE),)
-RVCT22_DELETE_HACK:=|| ($$(GNURM) $$@; exit 1;)
+RVCT22_DELETE_WORKAROUND:=|| { $$(GNURM) $$@; exit 1; }
endif # ifneq ($(DELETE_ON_FAILED_COMPILE),)
ALLTARGET:=ALL
--- a/sbsv2/raptor/lib/flm/standard.xml Tue Mar 30 15:34:13 2010 +0100
+++ b/sbsv2/raptor/lib/flm/standard.xml Thu Apr 01 10:50:16 2010 +0100
@@ -74,7 +74,7 @@
<param name='CC.VAL.SOFTVFP_MAYBE_VFPV2' default=''/>
<param name='CODE_SEGMENT_START' default=''/>
<param name='TOOLCHAIN' default=''/>
- <param name='USE_RVCT22_DELETE_HACK' default=''/>
+ <param name='USE_RVCT22_DELETE_WORKAROUND' default=''/>
</interface>
<interface name="Symbian.e32abiv2" extends="Symbian.mmp" flm="e32abiv2.flm">
<param name='SUPPORTS_STDCPP_NEWLIB' default='1'/>
--- a/sbsv2/raptor/python/raptor_make.py Tue Mar 30 15:34:13 2010 +0100
+++ b/sbsv2/raptor/python/raptor_make.py Thu Apr 01 10:50:16 2010 +0100
@@ -118,7 +118,7 @@
self.talontimeout = str(evaluator.Get("TALON_TIMEOUT"))
self.talonretries = str(evaluator.Get("TALON_RETRIES"))
- # Get the ####################################
+ # work around for RVCT 2.2 failed compiles
delete_on_failed_compile_s = evaluator.Get("DELETE_ON_FAILED_COMPILE")
self.delete_on_failed_compile = ""
if delete_on_failed_compile_s is not None and delete_on_failed_compile_s != "":
--- a/sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py Tue Mar 30 15:34:13 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py Thu Apr 01 10:50:16 2010 +0100
@@ -55,7 +55,8 @@
"test_/armv5/urel/test5.o",
"test_/armv5/urel/test6.o" ])
sbshome = os.environ["SBS_HOME"].replace("\\","/").rstrip("/")
- t.command = base_command.replace("armv5", "armv5.fake_compiler") + " --configpath=%s/test/smoke_suite/test_resources/simple/makevariants" % sbshome
+ t.command = base_command.replace("armv5", "armv5.fake_compiler") + \
+ " --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants" % sbshome
t.run()
t.id = "116c"
@@ -66,6 +67,42 @@
t.command = base_command + " reallyclean"
t.run()
+ t.id = "116d" # Use a redefined make_engine variant - object files *should* be present
+ t.name = "delete_on_failed_compile_build_redefined_make_engine"
+ t.errors = 0
+ t.returncode = 1
+ t.antitargets = [] # Remove the list of anti-targets
+ # All of these files should be present
+ t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf',
+ [ "test_/armv5/udeb/test.o",
+ "test_/armv5/udeb/test1.o",
+ "test_/armv5/udeb/test2.o",
+ "test_/armv5/udeb/test3.o",
+ "test_/armv5/udeb/test4.o",
+ "test_/armv5/udeb/test5.o",
+ "test_/armv5/udeb/test6.o",
+ "test_/armv5/urel/test.o",
+ "test_/armv5/urel/test1.o",
+ "test_/armv5/urel/test2.o",
+ "test_/armv5/urel/test3.o",
+ "test_/armv5/urel/test4.o",
+ "test_/armv5/urel/test5.o",
+ "test_/armv5/urel/test6.o" ])
+
+ t.command = base_command.replace("armv5", "armv5.fake_compiler") + " -e make_test " \
+ + " --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants " % sbshome \
+ + " --configpath=%s/test/smoke_suite/test_resources/simple/makevariants" % sbshome
+ t.run()
+
+ t.id = "116e"
+ t.name = "delete_on_failed_compile_reallyclean_03"
+ t.errors = 0
+ t.returncode = 0
+ t.antitargets = [] # Remove the list of anti-targets
+ t.targets = [] # Remove the list of targets
+ t.command = base_command + " reallyclean"
+ t.run()
+
t.id = "116"
t.name = "delete_on_failed_compile"
t.print_result()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py Thu Apr 01 10:50:16 2010 +0100
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# delete_on_failed_compile.py
+# This is a test module for verifying the delete on failed compile
+# work around for RVCT 2.2. It creates a dummy object file and
+# exits with an error code which should result in object files being deleted.
+# It takes the same arguments as armcc, but ignores them all apart from -o.
+#
+
+import sys
+import os
+import re
+
+# Parse for -o argument.
+objectfile_re = re.compile(".*-o\s(\S*\.(o|pre))\s.*", re.I)
+res = objectfile_re.match(" ".join(sys.argv[1:]))
+
+if res:
+ objectpath = res.group(1)
+ print "Found object file %s" % objectpath
+ objectdirectory = os.path.dirname(objectpath)
+
+ # Make the directory if it doesn't exist
+ if not os.path.isdir(objectdirectory):
+ try:
+ os.makedirs(objectdirectory)
+ except:
+ print "Not making directory %s" % objectdirectory
+
+ # Try to write something to the .o file
+ try:
+ fh = open(objectpath, "w")
+ fh.write("Fake object file for delete on failed compile test\n")
+ fh.close()
+ except Exception as error:
+ print "Failed to created object file %s; error was: %s" % (objectfile, str(error))
+else:
+ print "Failed to determine object filename. Commandline used was: %s" % " ".join(sys.argv[1:])
+
+# Always exit with an error
+print "Exiting with non-zero exit code."
+sys.exit(1)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/compilervariants/delete_on_failed_compile_compiler_variants.xml Thu Apr 01 10:50:16 2010 +0100
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<build xmlns="http://symbian.com/xml/build" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symbian.com/xml/build ../../schema/build/2_0.xsd">
+ <!-- Fake compiler variant for testing the -->
+ <var name="fake_compiler">
+ <set name='CC' value='python -u $(SBS_HOME)/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py'/>
+ </var>
+
+</build>
--- a/sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml Tue Mar 30 15:34:13 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml Thu Apr 01 10:50:16 2010 +0100
@@ -56,9 +56,5 @@
<set name='DEFAULT_SHELL' value='$(SBS_SHELL)' type='tool'/>
<set name='USE_TALON' value=''/>
</var>
+</build>
- <var name="fake_compiler">
- <set name='CC' value='fake_compiler'/>
- </var>
-
-</build>