Browse Source

BUG: Do not write link script lines that use the ':' command which is supposed to be a no-op anyway.

Brad King 19 years ago
parent
commit
0a89a904b3
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Source/cmMakefileLibraryTargetGenerator.cxx

+ 6 - 1
Source/cmMakefileLibraryTargetGenerator.cxx

@@ -567,7 +567,12 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
     for(std::vector<std::string>::iterator cmd = link_script_commands.begin();
         cmd != link_script_commands.end(); ++cmd)
       {
-      (*linkScriptStream) << *cmd << "\n";
+      // Do not write out empty commands or commands beginning in the
+      // shell no-op ":".
+      if(!cmd->empty() && (*cmd)[0] != ':')
+        {
+        (*linkScriptStream) << *cmd << "\n";
+        }
       }
     }