Fix CygWinGCC build failed. When GCC build, map file is not generated. We don't need...
[mirror_edk2.git] / Tools / Conf / BuildMacro.xml
index 1ddcbc0..2e1d6ad 100644 (file)
@@ -1035,7 +1035,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <!-- Copy the efi file to BIN and OUTPUT directory -->\r
           <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${BIN_DIR}/@{FILENAME}.efi" />\r
           <copy file="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}/@{FILENAME}.efi" />\r
-          <copy file="${DEST_DIR_DEBUG}/@{FILENAME}.map" tofile="${BIN_DIR}/@{FILENAME}.map" />\r
+          <if>\r
+            <available file="${DEST_DIR_DEBUG}/@{FILENAME}.map" />\r
+            <then>\r
+              <copy file="${DEST_DIR_DEBUG}/@{FILENAME}.map" tofile="${BIN_DIR}/@{FILENAME}.map" />\r
+            </then>\r
+          </if>\r
         </sequential>\r
       </OnDependency>\r
     </sequential>\r