From 7e9358786a756fd8362b9577e94946235114b182 Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Thu, 30 Jun 2016 15:42:57 +0000 Subject: Remove hacks of building dll from msvc_link.py -- Change-Id: I53ec66581c59d4bba8460fb3e5d20258ea36d0f1 Reviewed-on: https://bazel-review.googlesource.com/#/c/3940 MOS_MIGRATED_REVID=126306276 --- tools/cpp/wrapper/bin/pydir/msvc_link.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'tools/cpp/wrapper/bin/pydir') diff --git a/tools/cpp/wrapper/bin/pydir/msvc_link.py b/tools/cpp/wrapper/bin/pydir/msvc_link.py index 95f1315652..8436f5fbef 100644 --- a/tools/cpp/wrapper/bin/pydir/msvc_link.py +++ b/tools/cpp/wrapper/bin/pydir/msvc_link.py @@ -15,7 +15,6 @@ """Wrapper script for executing the Microsoft Linker.""" import os -import shutil import sys import msvc_tools @@ -70,15 +69,9 @@ class MsvcLinker(msvc_tools.WindowsRunner): # Find the output file name. name = '' - self.output_dll_file = None for arg in parser.options: if '/OUT:' in arg: name = arg[5:] - # if output file ends with .so, we generate dll library. - if name.endswith('.so'): - default_args.append('/DLL') - self.output_dll_file = os.path.normpath(name[0:-3]) - break if not name: raise msvc_tools.Error('No output file name specified!') # Check if the library is empty, which is what happens when we create header @@ -123,12 +116,8 @@ class MsvcLinker(msvc_tools.WindowsRunner): else: default_args.insert(0, 'libcmt.lib') - ret_code = self.RunBinary(tool, default_args + parser.options, - parser.target_arch, parser) - if not ret_code and self.output_dll_file: - shutil.copyfile(self.output_dll_file + '.so', - self.output_dll_file + '.dll') - return ret_code + return self.RunBinary(tool, default_args + parser.options, + parser.target_arch, parser) def main(argv): -- cgit v1.2.3