revert 37889 (still consuses rsym)
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 8 Dec 2008 07:33:04 +0000 (07:33 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 8 Dec 2008 07:33:04 +0000 (07:33 +0000)
svn path=/branches/ros-amd64-bringup/; revision=37924

reactos/tools/rbuild/backend/mingw/modulehandler.cpp
reactos/tools/rbuild/module.cpp
reactos/tools/rbuild/project.cpp

index dc1b4cf..b83cfac 100644 (file)
@@ -1434,9 +1434,6 @@ MingwModuleHandler::GenerateRunRsymCode () const
              "ifneq ($(ROS_GENERATE_RSYM),no)\n" );
        fprintf ( fMakefile,
                  "\t$(ECHO_RSYM)\n" );
-       // FIXME! workaround until rsym can extract line numbers from DWARF
-       fprintf ( fMakefile,
-                 "\t$(Q)${objcopy} -R .debug_abbrev -R .debug_aranges -R .debug_frame -R .debug_info -R .debug_line -R .debug_pubnames -R .debug_macinfo -R .debug_str -R .debug_loc -R .debug_pubtypes -R .debug_ranges -R .debug_static_func -R .debug_static_vars -R .debug_types -R .debug_weaknames $@\n\n" );
        fprintf ( fMakefile,
                  "\t$(Q)$(RSYM_TARGET) $@ $@\n\n" );
        fprintf ( fMakefile,
@@ -2018,6 +2015,16 @@ MingwModuleHandler::GenerateOtherMacros ()
                          linkerflags );
        }
 
+       if ( IsStaticLibrary ( module ) && module.isStartupLib )
+       {
+               fprintf ( fMakefile,
+                         "%s += -Wno-main\n\n",
+                         cflagsMacro.c_str () );
+               fprintf ( fMakefile,
+                         "%s += -Wno-main\n\n",
+                         cxxflagsMacro.c_str () );
+       }
+
        fprintf ( fMakefile, "\n\n" );
 
        // future references to the macros will be to get their values
index 215ad8d..81c3916 100644 (file)
@@ -745,17 +745,13 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
                name = e.GetAttribute ( "property", true );
                assert( name );
                const Property *property = project.LookupProperty( name->value );
-               const string *PropertyValue;
-               const string EmptyString;
-
-               if (property)
-               {
-                       PropertyValue = &property->value;
-               }
-               else
+               if ( !property )
                {
-                       // Property does not exist, treat it as being empty
-                       PropertyValue = &EmptyString;
+                       // Property not found
+                       throw InvalidOperationException ( __FILE__,
+                                                         __LINE__,
+                                                         "Test on unknown property '%s' at %s",
+                                                         name->value.c_str (), e.location.c_str () );
                }
 
                const XMLAttribute* value;
@@ -763,7 +759,7 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
                assert( value );
 
                bool negate = ( e.name == "ifnot" );
-               bool equality = ( *PropertyValue == value->value );
+               bool equality = ( property->value == value->value );
                if ( equality == negate )
                {
                        // Failed, skip this element
index 8366ce9..8660120 100644 (file)
@@ -399,17 +399,13 @@ Project::ProcessXMLSubElement ( const XMLElement& e,
                name = e.GetAttribute ( "property", true );
                assert( name );
                const Property *property = LookupProperty( name->value );
-               const string *PropertyValue;
-               const string EmptyString;
-
-               if (property)
-               {
-                       PropertyValue = &property->value;
-               }
-               else
+               if ( !property )
                {
-                       // Property does not exist, treat it as being empty
-                       PropertyValue = &EmptyString;
+                       // Property not found
+                       throw InvalidOperationException ( __FILE__,
+                                                         __LINE__,
+                                                         "Test on unknown property '%s' at %s",
+                                                         name->value.c_str (), e.location.c_str () );
                }
 
                const XMLAttribute* value;
@@ -417,7 +413,7 @@ Project::ProcessXMLSubElement ( const XMLElement& e,
                assert( value );
 
                bool negate = ( e.name == "ifnot" );
-               bool equality = ( *PropertyValue == value->value );
+               bool equality = ( property->value == value->value );
                if ( equality == negate )
                {
                        // Failed, skip this element