From: <ta...@us...> - 2010-03-30 20:58:19
|
Revision: 13593 http://x10.svn.sourceforge.net/x10/?rev=13593&view=rev Author: tardieu Date: 2010-03-30 20:58:10 +0000 (Tue, 30 Mar 2010) Log Message: ----------- removed -DISABLE_GC switch on x10c++ include files now are different for GC vs no-GC builds of the runtime Modified Paths: -------------- trunk/x10.compiler/src/x10cpp/Configuration.java trunk/x10.compiler/src/x10cpp/postcompiler/AIX_CXXCommandBuilder.java trunk/x10.compiler/src/x10cpp/postcompiler/CXXCommandBuilder.java trunk/x10.compiler/src/x10cpp/postcompiler/Cygwin_CXXCommandBuilder.java trunk/x10.compiler/src/x10cpp/postcompiler/Linux_CXXCommandBuilder.java trunk/x10.compiler/src/x10cpp/postcompiler/MacOSX_CXXCommandBuilder.java trunk/x10.compiler/src/x10cpp/postcompiler/SunOS_CXXCommandBuilder.java trunk/x10.runtime/src-cpp/Makefile trunk/x10.runtime/src-cpp/x10aux/config.h Added Paths: ----------- trunk/x10.runtime/src-cpp/x10aux/bdwgc.h trunk/x10.runtime/src-cpp/x10aux/bdwgc_off.h trunk/x10.runtime/src-cpp/x10aux/bdwgc_on.h Modified: trunk/x10.compiler/src/x10cpp/Configuration.java =================================================================== --- trunk/x10.compiler/src/x10cpp/Configuration.java 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.compiler/src/x10cpp/Configuration.java 2010-03-30 20:58:10 UTC (rev 13593) @@ -39,9 +39,6 @@ public static boolean VIM_MODELINE = true; private static final String VIM_MODELINE_desc = "Generate a modeline (formatting instructions) for VIm"; - public static boolean DISABLE_GC = false; - private static final String DISABLE_GC_desc = "Disable the linking in of the BDW conservative garbage collector"; - /** * Parses one argument from the command line. This allows the user * to specify options also on the command line (in addition to the Modified: trunk/x10.compiler/src/x10cpp/postcompiler/AIX_CXXCommandBuilder.java =================================================================== --- trunk/x10.compiler/src/x10cpp/postcompiler/AIX_CXXCommandBuilder.java 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.compiler/src/x10cpp/postcompiler/AIX_CXXCommandBuilder.java 2010-03-30 20:58:10 UTC (rev 13593) @@ -27,8 +27,6 @@ assert (CXXCommandBuilder.PLATFORM.startsWith("aix_")); } - protected boolean gcEnabled() { return false; } - protected void addPreArgs(ArrayList<String> cxxCmd) { super.addPreArgs(cxxCmd); Modified: trunk/x10.compiler/src/x10cpp/postcompiler/CXXCommandBuilder.java =================================================================== --- trunk/x10.compiler/src/x10cpp/postcompiler/CXXCommandBuilder.java 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.compiler/src/x10cpp/postcompiler/CXXCommandBuilder.java 2010-03-30 20:58:10 UTC (rev 13593) @@ -100,9 +100,6 @@ x10rtOpts = new X10RTPostCompileOptions(rtimpl); } - /** Is GC enabled on this platform? */ - protected boolean gcEnabled() { return false; } - protected String defaultPostCompiler() { return x10rtOpts.cxx; } @@ -117,10 +114,6 @@ // headers generated from user input cxxCmd.add("-I"+options.output_directory); cxxCmd.add("-I."); - - if (!Configuration.DISABLE_GC && gcEnabled()) { - cxxCmd.add("-DX10_USE_BDWGC"); - } if (x10.Configuration.OPTIMIZE) { cxxCmd.add(USE_XLC ? "-O3" : "-O2"); Modified: trunk/x10.compiler/src/x10cpp/postcompiler/Cygwin_CXXCommandBuilder.java =================================================================== --- trunk/x10.compiler/src/x10cpp/postcompiler/Cygwin_CXXCommandBuilder.java 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.compiler/src/x10cpp/postcompiler/Cygwin_CXXCommandBuilder.java 2010-03-30 20:58:10 UTC (rev 13593) @@ -23,8 +23,6 @@ assert (CXXCommandBuilder.PLATFORM.startsWith("win32_")); } - protected boolean gcEnabled() { return true; } - protected String defaultPostCompiler() { return "g++-4"; } Modified: trunk/x10.compiler/src/x10cpp/postcompiler/Linux_CXXCommandBuilder.java =================================================================== --- trunk/x10.compiler/src/x10cpp/postcompiler/Linux_CXXCommandBuilder.java 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.compiler/src/x10cpp/postcompiler/Linux_CXXCommandBuilder.java 2010-03-30 20:58:10 UTC (rev 13593) @@ -25,8 +25,6 @@ assert (CXXCommandBuilder.PLATFORM.startsWith("linux_")); } - protected boolean gcEnabled() { return true; } - protected void addPreArgs(ArrayList<String> cxxCmd) { super.addPreArgs(cxxCmd); cxxCmd.add("-Wno-long-long"); Modified: trunk/x10.compiler/src/x10cpp/postcompiler/MacOSX_CXXCommandBuilder.java =================================================================== --- trunk/x10.compiler/src/x10cpp/postcompiler/MacOSX_CXXCommandBuilder.java 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.compiler/src/x10cpp/postcompiler/MacOSX_CXXCommandBuilder.java 2010-03-30 20:58:10 UTC (rev 13593) @@ -25,8 +25,6 @@ assert (CXXCommandBuilder.PLATFORM.startsWith("macosx_")); } - protected boolean gcEnabled() { return true; } - protected void addPreArgs(ArrayList<String> cxxCmd) { super.addPreArgs(cxxCmd); if (USE_32BIT) { Modified: trunk/x10.compiler/src/x10cpp/postcompiler/SunOS_CXXCommandBuilder.java =================================================================== --- trunk/x10.compiler/src/x10cpp/postcompiler/SunOS_CXXCommandBuilder.java 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.compiler/src/x10cpp/postcompiler/SunOS_CXXCommandBuilder.java 2010-03-30 20:58:10 UTC (rev 13593) @@ -23,8 +23,6 @@ assert (CXXCommandBuilder.PLATFORM.startsWith("sunos_")); } - protected boolean gcEnabled() { return false; } - protected void addPreArgs(ArrayList<String> cxxCmd) { super.addPreArgs(cxxCmd); cxxCmd.add("-Wno-long-long"); Modified: trunk/x10.runtime/src-cpp/Makefile =================================================================== --- trunk/x10.runtime/src-cpp/Makefile 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.runtime/src-cpp/Makefile 2010-03-30 20:58:10 UTC (rev 13593) @@ -6,10 +6,13 @@ INCLUDE_DIRS += -I. -I../x10rt/include +BDWGC_CONFIG=bdwgc_off.h + ifdef ENABLE_GC override CXXFLAGS += -DX10_USE_BDWGC BDWGC_INCLUDE_DIR= ./bdwgc/install/include INCLUDE_DIRS += -I$(BDWGC_INCLUDE_DIR) + BDWGC_CONFIG=bdwgc_on.h endif override CXXFLAGS += $(INCLUDE_DIRS) -Igen @@ -199,6 +202,7 @@ @cp -p x10rt.h $(INSTDIR)/include @cp -p $(XRX_ARCHIVE) $(INSTDIR)/lib @cp -p $(XRX_MANIFEST) $(INSTDIR)/lib + @cp -p $(INSTDIR)/include/x10aux/$(BDWGC_CONFIG) $(INSTDIR)/include/x10aux/bdwgc.h .PHONY: install Added: trunk/x10.runtime/src-cpp/x10aux/bdwgc.h =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/bdwgc.h (rev 0) +++ trunk/x10.runtime/src-cpp/x10aux/bdwgc.h 2010-03-30 20:58:10 UTC (rev 13593) @@ -0,0 +1,11 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2006-2010. + */ + Added: trunk/x10.runtime/src-cpp/x10aux/bdwgc_off.h =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/bdwgc_off.h (rev 0) +++ trunk/x10.runtime/src-cpp/x10aux/bdwgc_off.h 2010-03-30 20:58:10 UTC (rev 13593) @@ -0,0 +1,10 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2006-2010. + */ Added: trunk/x10.runtime/src-cpp/x10aux/bdwgc_on.h =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/bdwgc_on.h (rev 0) +++ trunk/x10.runtime/src-cpp/x10aux/bdwgc_on.h 2010-03-30 20:58:10 UTC (rev 13593) @@ -0,0 +1,12 @@ +/* + * This file is part of the X10 project (http://x10-lang.org). + * + * This file is licensed to You under the Eclipse Public License (EPL); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * (C) Copyright IBM Corporation 2006-2010. + */ + +#define X10_USE_BDWGC Modified: trunk/x10.runtime/src-cpp/x10aux/config.h =================================================================== --- trunk/x10.runtime/src-cpp/x10aux/config.h 2010-03-30 20:37:10 UTC (rev 13592) +++ trunk/x10.runtime/src-cpp/x10aux/config.h 2010-03-30 20:58:10 UTC (rev 13593) @@ -12,6 +12,8 @@ #ifndef X10AUX_CONFIG_H #define X10AUX_CONFIG_H +#include <x10aux/bdwgc.h> + /* * The following performance macros are supported: * NO_EXCEPTIONS - remove all exception-related code This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |