mirror of
https://github.com/php/php-src.git
synced 2025-01-22 03:34:19 +08:00
Use $(CC) for linking instead of $(LD). This allows usage of advansed optimization techniques (like Intel's inner-procedure optimization)
This commit is contained in:
parent
a930751112
commit
bcfc501ca6
@ -61,7 +61,7 @@ $(PHPDLL_RES): win32\build\template.rc
|
||||
win32\build\template.rc
|
||||
|
||||
$(BUILD_DIR)\$(PHPDLL): generated_files $(PHPDEF) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(PHPDLL_RES) $(MCFILE)
|
||||
@$(LD) /out:$(BUILD_DIR)\$(PHPDLL) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES)
|
||||
@$(CC) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) /link /out:$(BUILD_DIR)\$(PHPDLL) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS)
|
||||
|
||||
$(BUILD_DIR)\$(PHPLIB): $(BUILD_DIR)\$(PHPDLL)
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
// $Id: confutils.js,v 1.60.2.1.2.1 2006-05-07 00:04:56 edink Exp $
|
||||
// $Id: confutils.js,v 1.60.2.1.2.2 2006-11-10 10:30:46 dmitry Exp $
|
||||
|
||||
var STDOUT = WScript.StdOut;
|
||||
var STDERR = WScript.StdErr;
|
||||
@ -578,7 +578,7 @@ function CHECK_LIB(libnames, target, path_to_check, common_name)
|
||||
path_to_check += ";" + php_usual_lib_suspects;
|
||||
|
||||
// It is common practice to put libs under one of these dir names
|
||||
var subdirs = new Array(PHP_DEBUG == "yes" ? "Debug" : "Release", "lib", "libs", "libexec");
|
||||
var subdirs = new Array(PHP_DEBUG == "yes" ? "Debug" : (PHP_DEBUG_PACK == "yes"?"Release_Dbg":"Release"), "lib", "libs", "libexec");
|
||||
|
||||
// libnames can be ; separated list of accepted library names
|
||||
libnames = libnames.split(';');
|
||||
@ -665,7 +665,7 @@ function OLD_CHECK_LIB(libnames, target, path_to_check)
|
||||
var i;
|
||||
var libname;
|
||||
|
||||
var subdir = PHP_DEBUG == "yes" ? "Debug" : "Release";
|
||||
var subdir = PHP_DEBUG == "yes" ? "Debug" : (PHP_DEBUG_PACK == "yes"?"Release_Dbg":"Release");
|
||||
|
||||
libnames = libnames.split(';');
|
||||
for (i = 0; i < libnames.length; i++) {
|
||||
@ -876,7 +876,7 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
|
||||
var SAPI = sapiname.toUpperCase();
|
||||
var ldflags;
|
||||
var resname;
|
||||
var ld = "@$(LD)";
|
||||
var ld;
|
||||
|
||||
if (typeof(obj_dir) == "undefined") {
|
||||
sapiname_for_printing = configure_module_dirname;
|
||||
@ -915,7 +915,16 @@ function SAPI(sapiname, file_list, makefiletarget, cflags, obj_dir)
|
||||
ldflags = "$(LDFLAGS)";
|
||||
}
|
||||
|
||||
MFO.WriteLine("\t" + ld + " /nologo /out:$(BUILD_DIR)\\" + makefiletarget + " " + ldflags + " $(" + SAPI + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LDFLAGS_" + SAPI + ") $(LIBS_" + SAPI + ") $(BUILD_DIR)\\" + resname);
|
||||
if(PHP_VCI = "yes" || PHP_VCO == "yes") {
|
||||
ldflags += " /PGD:$(BUILD_DIR)\\"+makefiletarget+".pgd";
|
||||
}
|
||||
|
||||
if (ld) {
|
||||
MFO.WriteLine("\t" + ld + " /nologo /out:$(BUILD_DIR)\\" + makefiletarget + " " + ldflags + " $(" + SAPI + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LDFLAGS_" + SAPI + ") $(LIBS_" + SAPI + ") $(BUILD_DIR)\\" + resname);
|
||||
} else {
|
||||
ld = "@$(CC)";
|
||||
MFO.WriteLine("\t" + ld + " /nologo " + " $(" + SAPI + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + SAPI + ") $(BUILD_DIR)\\" + resname + " /link /out:$(BUILD_DIR)\\" + makefiletarget + " " + ldflags + " $(LDFLAGS_" + SAPI + ")");
|
||||
}
|
||||
|
||||
DEFINE('CFLAGS_' + SAPI + '_OBJ', '$(CFLAGS_' + SAPI + ')');
|
||||
|
||||
@ -1031,10 +1040,10 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
|
||||
var libname = dllname.substring(0, dllname.length-4) + ".lib";
|
||||
|
||||
var resname = generate_version_info_resource(dllname, configure_module_dirname);
|
||||
var ld = "@$(LD)";
|
||||
var ld = "@$(CC)";
|
||||
|
||||
MFO.WriteLine("$(BUILD_DIR)\\" + dllname + " $(BUILD_DIR)\\" + libname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname);
|
||||
MFO.WriteLine("\t" + ld + " /out:$(BUILD_DIR)\\" + dllname + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname);
|
||||
MFO.WriteLine("\t" + ld + " $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname + " /link /out:$(BUILD_DIR)\\" + dllname + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ")");
|
||||
MFO.WriteBlankLines(1);
|
||||
|
||||
if (configure_module_dirname.match("pecl")) {
|
||||
@ -1211,7 +1220,7 @@ function generate_files()
|
||||
continue;
|
||||
}
|
||||
last = bd;
|
||||
ADD_FLAG("BUILD_DIRS_SUB", bd);
|
||||
ADD_FLAG("BUILD_DIRS_SUB", bd.replace(new RegExp('^'+dir+'\\\\'), '$(BUILD_DIR)\\'));
|
||||
if (!FSO.FolderExists(bd)) {
|
||||
FSO.CreateFolder(bd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user