Author: mattip <[email protected]>
Branch:
Changeset: r73525:1adc566ec0bf
Date: 2014-09-13 23:44 +0200
http://bitbucket.org/pypy/pypy/changeset/1adc566ec0bf/
Log: only specify Fd for non-makefile build (windows)
diff --git a/rpython/translator/platform/test/test_makefile.py
b/rpython/translator/platform/test/test_makefile.py
--- a/rpython/translator/platform/test/test_makefile.py
+++ b/rpython/translator/platform/test/test_makefile.py
@@ -44,6 +44,7 @@
assert res.returncode == 0
def test_900_files(self):
+ tmpdir = udir.join('test_900_files').ensure(dir=1)
txt = '#include <stdio.h>\n'
for i in range(900):
txt += 'int func%03d();\n' % i
@@ -52,11 +53,11 @@
txt += ' j += func%03d();\n' % i
txt += ' printf("%d\\n", j);\n'
txt += ' return 0;};\n'
- cfile = udir.join('test_900_files.c')
+ cfile = tmpdir.join('test_900_files.c')
cfile.write(txt)
cfiles = [cfile]
for i in range(900):
- cfile2 = udir.join('implement%03d.c' %i)
+ cfile2 = tmpdir.join('implement%03d.c' %i)
cfile2.write('''
int func%03d()
{
@@ -64,10 +65,10 @@
}
''' % (i, i))
cfiles.append(cfile2)
- mk = self.platform.gen_makefile(cfiles, ExternalCompilationInfo(),
path=udir)
+ mk = self.platform.gen_makefile(cfiles, ExternalCompilationInfo(),
path=tmpdir)
mk.write()
self.platform.execute_makefile(mk)
- res = self.platform.execute(udir.join('test_900_files'))
+ res = self.platform.execute(tmpdir.join('test_900_files'))
self.check_res(res, '%d\n' %sum(range(900)))
def test_precompiled_headers(self):
diff --git a/rpython/translator/platform/windows.py
b/rpython/translator/platform/windows.py
--- a/rpython/translator/platform/windows.py
+++ b/rpython/translator/platform/windows.py
@@ -204,8 +204,9 @@
# must come first, and after the file name all options are ignored.
# So please be careful with the order of parameters! ;-)
pdb_dir = oname.dirname
- args = ['/nologo', '/c'] + compile_args + ['/Fd%s\\' % (pdb_dir,),
- '/Fo%s' % (oname,), str(cfile)]
+ if pdb_dir:
+ compile_args += ['/Fd%s\\' % (pdb_dir,)]
+ args = ['/nologo', '/c'] + compile_args + ['/Fo%s' % (oname,),
str(cfile)]
self._execute_c_compiler(cc, args, oname)
return oname
@@ -347,7 +348,7 @@
'$(CREATE_PCH) $(INCLUDEDIRS)'))
rules.append(('.c.obj', '',
'$(CC) /nologo $(CFLAGS) $(CFLAGSEXTRA) $(USE_PCH) '
- '/Fd$(@D)\\ /Fo$@ /c $< $(INCLUDEDIRS)'))
+ '/Fo$@ /c $< $(INCLUDEDIRS)'))
#Do not use precompiled headers for some files
#rules.append((r'{..\module_cache}.c{..\module_cache}.obj', '',
# '$(CC) /nologo $(CFLAGS) $(CFLAGSEXTRA) /Fo$@ /c $<
$(INCLUDEDIRS)'))
@@ -362,13 +363,12 @@
target = f[:-1] + 'obj'
rules.append((target, f,
'$(CC) /nologo $(CFLAGS) $(CFLAGSEXTRA) '
- '/Fd%s\\ /Fo%s /c %s $(INCLUDEDIRS)' %(
- os.path.dirname(target), target, f)))
+ '/Fo%s /c %s $(INCLUDEDIRS)' %(target, f)))
else:
rules.append(('.c.obj', '',
'$(CC) /nologo $(CFLAGS) $(CFLAGSEXTRA) '
- '/Fd$(@D)\\ /Fo$@ /c $< $(INCLUDEDIRS)'))
+ '/Fo$@ /c $< $(INCLUDEDIRS)'))
for args in definitions:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit