2013-01-12 08:57:35 -06:00
|
|
|
# -*- mode:Python -*-
|
|
|
|
#
|
|
|
|
# This file is part of the Coriolis Software.
|
2018-01-06 10:55:44 -06:00
|
|
|
# Copyright (c) UPMC/LIP6 2008-2018, All Rights Reserved
|
2013-01-12 08:57:35 -06:00
|
|
|
#
|
|
|
|
# +-----------------------------------------------------------------+
|
|
|
|
# | C O R I O L I S |
|
|
|
|
# | C o r i o l i s / C h a m s B u i l d e r |
|
|
|
|
# | |
|
|
|
|
# | Author : Jean-Paul Chaput |
|
|
|
|
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
|
|
|
# | =============================================================== |
|
|
|
|
# | Python : "./builder/Builder.py" |
|
|
|
|
# +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import re
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
import datetime
|
|
|
|
import subprocess
|
|
|
|
from . import ErrorMessage
|
|
|
|
from Project import Project
|
|
|
|
from Configuration import Configuration
|
|
|
|
|
|
|
|
|
|
|
|
class Builder:
|
|
|
|
|
|
|
|
def __init__ ( self ):
|
|
|
|
self._conf = Configuration()
|
|
|
|
self._quiet = False
|
|
|
|
self._rmBuild = False
|
|
|
|
self._doBuild = True
|
|
|
|
self._noCache = False
|
2014-06-09 17:11:42 -05:00
|
|
|
self._ninja = False
|
2014-12-05 11:50:15 -06:00
|
|
|
self._clang = False
|
2016-07-13 07:33:21 -05:00
|
|
|
self._noSystemBoost = False
|
|
|
|
self._macports = False
|
2019-03-04 07:20:13 -06:00
|
|
|
self._devtoolset = 0
|
Groudwork for routing density driven placement. Compliance with clang 5.0.1.
This commit contains two set of features that should have been commited
separately.
1. Compliance with clang 5.0.1, tested with the RedHat collection
llvm-toolset-7. This allow Coriolis to be compiled under Darwin (MacOS)
with Xcode & macports. The bootstrap install system has been modificated
accordingly.
2. The basic support for routing density driven placement. Related
features are:
* Bloat property. Each Occurrence of an Instance can be individually
bloated. This property not attached to any tool to allow the placer and
router to share it as wanted. Nevertheless, it is defined in Etesian.
* BloatProfile in Katana, add individual Bloat properties to Instances
occurrences based on the East & North overflowed edges of each GCell.
* Support in ToolEngine for a "pass number" of a tool. This pass number
is mainly used to make "per pass" measurements. The MeasureSet system
is improved accordingly to support multiple values of a same measure.
* Embryo of "P&R Conductor" to perform the place & route loop until the
design is successfully placed. May be the first brick of a Silicon
Compiler.
* Change: In boostrap/FindBoostrap.cmake, in setup_boost(), added tag to
the python component for macport (ex: python27).
* Change: In boostrap/build.conf, put etesian before anabatic for
instance occurrence BloatProperty dependency.
Added option support for the "llvm-toolset-7" collection to build
against clang 5.0.1.
* Bug: In Hurricane::getRecord( const pair<T,U>& ), the getSlot<> templates
for first & second arguments must be called with <const T> and <const U>
as the pair itself is const (and not simply <T> & <U>).
* Change: In Hurricane::getSlot() temlate, only use "string" arguments and
not const string&, simpler for template argument deduction.
* Bug: In Hurricane::AnalogCellExtension, the StandardPrivateProperty<>
template has a static member "_name". Clang did show that the template
for this static number has to be put inside the namespace where the
template *is defined* (i.e. Hurricane) instead of the namespace where
it is instanciated (i.e. Analog).
* Bug: In Isobar, Matrix_FromListOfList(), PyInt_AsPlacementStatus() must
be put outside the C linkage back in the Isobar C++ namespace (clang).
* Bug: In Hurricane::DBo::~DBo, and derived add a throw() specification
(clang).
* Bug: In Hurricane::RegularLayer::getEnclosure() & setEnclosure(), change
signature so it matches the one of the base class (clang).
* Bug: In Hurricane::CellPrinter, use double brackets for initializer list
(clang).
* Change: In Hurricane::Breakpoint, reverse the meaning of the error level.
Only error level *lesser or equal* than the stop level will be enabled.
* Bug: In CRL/python/helpers/__init__.loadUserSettings(), must put the
current working directory in the sys.path as in certain configuration
it may not be included.
* Bug: In CRL::ApDriver, DumpSegments(), no longer generate segments when
encountering a RoutingPad on a top-level Pin Occurrence. The segment
was generated in the wrong direction, creating DRC violations on the
"mips_core_flat" example.
* Change: In CRL::Measures, partial re-design of the measurements management.
Now, each kind of measure can accept multiple values put in a vector.
The index is intented to match a tool run number.
* Change: In CRL::Histogram, add support for multiple sets of datas,
indexeds with tool run number.
* Change: In CRL::ToolEngine, add support for multiple pass number, add
addMeasure<> templates for the various data-types.
* Change: In CRL::gdsDriver & CRL::gdsParser(), comment out unused GDS record
name constants.
* New: Etesian::BloatProperty, property to attach to Instance occurrences
that contains the extra number of pitch to add to the cell width.
* Bug: In AutoSegment::CompareByDepthLength, the segment length comparison
was wrong, it was always returning true, which broke the "strick weak
ordering" of the comparison.
This was producing a core-dump in GCell::updateDensity() when sorting
a vector<>. The end() iterator was being dereferenced, leading to the
problem.
* Bug: In Katana::DataSymmetric::checkPairing(), the test for segments
whose axis is perpandicular to the symmetry axis was wrong
("!=" instead of "-").
* New: In Katana/GlobalRoute, new ::selectSegments(), selectOverloadedgcells()
and selectBloatedInstances() to automatically select segments from
overloaded edges, overloaded GCells and bloated cells.
* Change: In KatanaEngine, return a more detailed success state, distinguish
between global and detailed.
Add support for multiple routing iterations.
* New: In cumulus/python/plugins/ConductorPlugin.py, embryo of routing
driven placement.
2019-12-08 18:57:44 -06:00
|
|
|
self._llvmtoolset = 0
|
2014-07-22 04:06:26 -05:00
|
|
|
self._qt5 = False
|
2015-04-08 10:45:45 -05:00
|
|
|
self._openmp = False
|
2013-01-12 08:57:35 -06:00
|
|
|
self._enableShared = "ON"
|
|
|
|
self._enableDoc = "OFF"
|
|
|
|
self._checkDatabase = "OFF"
|
|
|
|
self._checkDeterminism = "OFF"
|
|
|
|
self._verboseMakefile = "OFF"
|
|
|
|
self._makeArguments = []
|
|
|
|
self._environment = os.environ
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def __setattr__ ( self, attribute, value ):
|
|
|
|
if attribute[0] == "_":
|
|
|
|
self.__dict__[attribute] = value
|
|
|
|
return
|
|
|
|
|
|
|
|
if attribute in self._conf.getAllIds(): setattr( self._conf, attribute, value )
|
|
|
|
|
2013-11-05 07:27:24 -06:00
|
|
|
if attribute == "quiet": self._quiet = value
|
|
|
|
elif attribute == "rmBuild": self._rmBuild = value
|
|
|
|
elif attribute == "doBuild": self._doBuild = value
|
|
|
|
elif attribute == "noCache": self._noCache = value
|
2014-06-09 17:11:42 -05:00
|
|
|
elif attribute == "ninja": self._ninja = value
|
2014-12-05 11:50:15 -06:00
|
|
|
elif attribute == "clang": self._clang = value
|
2016-07-13 07:33:21 -05:00
|
|
|
elif attribute == "macports":
|
|
|
|
self._macports = value
|
|
|
|
if value: self._noSystemBoost = True
|
2019-03-04 07:20:13 -06:00
|
|
|
elif attribute == "devtoolset":
|
|
|
|
self._devtoolset = value
|
2019-03-11 10:01:11 -05:00
|
|
|
if value: self._noSystemBoost = True
|
Groudwork for routing density driven placement. Compliance with clang 5.0.1.
This commit contains two set of features that should have been commited
separately.
1. Compliance with clang 5.0.1, tested with the RedHat collection
llvm-toolset-7. This allow Coriolis to be compiled under Darwin (MacOS)
with Xcode & macports. The bootstrap install system has been modificated
accordingly.
2. The basic support for routing density driven placement. Related
features are:
* Bloat property. Each Occurrence of an Instance can be individually
bloated. This property not attached to any tool to allow the placer and
router to share it as wanted. Nevertheless, it is defined in Etesian.
* BloatProfile in Katana, add individual Bloat properties to Instances
occurrences based on the East & North overflowed edges of each GCell.
* Support in ToolEngine for a "pass number" of a tool. This pass number
is mainly used to make "per pass" measurements. The MeasureSet system
is improved accordingly to support multiple values of a same measure.
* Embryo of "P&R Conductor" to perform the place & route loop until the
design is successfully placed. May be the first brick of a Silicon
Compiler.
* Change: In boostrap/FindBoostrap.cmake, in setup_boost(), added tag to
the python component for macport (ex: python27).
* Change: In boostrap/build.conf, put etesian before anabatic for
instance occurrence BloatProperty dependency.
Added option support for the "llvm-toolset-7" collection to build
against clang 5.0.1.
* Bug: In Hurricane::getRecord( const pair<T,U>& ), the getSlot<> templates
for first & second arguments must be called with <const T> and <const U>
as the pair itself is const (and not simply <T> & <U>).
* Change: In Hurricane::getSlot() temlate, only use "string" arguments and
not const string&, simpler for template argument deduction.
* Bug: In Hurricane::AnalogCellExtension, the StandardPrivateProperty<>
template has a static member "_name". Clang did show that the template
for this static number has to be put inside the namespace where the
template *is defined* (i.e. Hurricane) instead of the namespace where
it is instanciated (i.e. Analog).
* Bug: In Isobar, Matrix_FromListOfList(), PyInt_AsPlacementStatus() must
be put outside the C linkage back in the Isobar C++ namespace (clang).
* Bug: In Hurricane::DBo::~DBo, and derived add a throw() specification
(clang).
* Bug: In Hurricane::RegularLayer::getEnclosure() & setEnclosure(), change
signature so it matches the one of the base class (clang).
* Bug: In Hurricane::CellPrinter, use double brackets for initializer list
(clang).
* Change: In Hurricane::Breakpoint, reverse the meaning of the error level.
Only error level *lesser or equal* than the stop level will be enabled.
* Bug: In CRL/python/helpers/__init__.loadUserSettings(), must put the
current working directory in the sys.path as in certain configuration
it may not be included.
* Bug: In CRL::ApDriver, DumpSegments(), no longer generate segments when
encountering a RoutingPad on a top-level Pin Occurrence. The segment
was generated in the wrong direction, creating DRC violations on the
"mips_core_flat" example.
* Change: In CRL::Measures, partial re-design of the measurements management.
Now, each kind of measure can accept multiple values put in a vector.
The index is intented to match a tool run number.
* Change: In CRL::Histogram, add support for multiple sets of datas,
indexeds with tool run number.
* Change: In CRL::ToolEngine, add support for multiple pass number, add
addMeasure<> templates for the various data-types.
* Change: In CRL::gdsDriver & CRL::gdsParser(), comment out unused GDS record
name constants.
* New: Etesian::BloatProperty, property to attach to Instance occurrences
that contains the extra number of pitch to add to the cell width.
* Bug: In AutoSegment::CompareByDepthLength, the segment length comparison
was wrong, it was always returning true, which broke the "strick weak
ordering" of the comparison.
This was producing a core-dump in GCell::updateDensity() when sorting
a vector<>. The end() iterator was being dereferenced, leading to the
problem.
* Bug: In Katana::DataSymmetric::checkPairing(), the test for segments
whose axis is perpandicular to the symmetry axis was wrong
("!=" instead of "-").
* New: In Katana/GlobalRoute, new ::selectSegments(), selectOverloadedgcells()
and selectBloatedInstances() to automatically select segments from
overloaded edges, overloaded GCells and bloated cells.
* Change: In KatanaEngine, return a more detailed success state, distinguish
between global and detailed.
Add support for multiple routing iterations.
* New: In cumulus/python/plugins/ConductorPlugin.py, embryo of routing
driven placement.
2019-12-08 18:57:44 -06:00
|
|
|
elif attribute == "llvmtoolset":
|
|
|
|
self._llvmtoolset = value
|
2014-07-22 04:06:26 -05:00
|
|
|
elif attribute == "qt5": self._qt5 = value
|
2015-04-08 10:45:45 -05:00
|
|
|
elif attribute == "openmp": self._openmp = value
|
2013-11-05 07:27:24 -06:00
|
|
|
elif attribute == "enableDoc": self._enableDoc = value
|
|
|
|
elif attribute == "enableShared": self._enableShared = value
|
|
|
|
elif attribute == "checkDatabase": self._checkDatabase = value
|
|
|
|
elif attribute == "checkDeterminism": self._checkDeterminism = value
|
|
|
|
elif attribute == "verboseMakefile": self._verboseMakefile = value
|
|
|
|
elif attribute == "makeArguments": self._makeArguments = value.split ()
|
2013-01-12 08:57:35 -06:00
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def __getattr__ ( self, attribute ):
|
|
|
|
if attribute[0] != "_":
|
|
|
|
if attribute == 'conf': return self._conf
|
|
|
|
if attribute in self._conf.getAllIds():
|
|
|
|
return getattr( self._conf, attribute )
|
|
|
|
|
|
|
|
if not self.__dict__.has_key(attribute):
|
|
|
|
raise ErrorMessage( 1, 'Builder has no attribute <%s>.'%attribute )
|
|
|
|
return self.__dict__[attribute]
|
|
|
|
|
|
|
|
|
2015-04-07 17:13:27 -05:00
|
|
|
def _guessGitHash ( self, project ):
|
|
|
|
self.gitHash = 'x'
|
|
|
|
os.chdir ( self.sourceDir+'/'+project.getName() )
|
|
|
|
command = [ 'git', 'log', '--pretty=format:%h', '-n', '1']
|
|
|
|
self.gitHash = subprocess.Popen ( command, stdout=subprocess.PIPE ).stdout.readlines()[0]
|
|
|
|
return
|
2013-01-12 08:57:35 -06:00
|
|
|
|
|
|
|
|
2015-04-07 17:33:26 -05:00
|
|
|
def _configure ( self, fileIn, fileOut ):
|
|
|
|
fdFileIn = open ( fileIn , "r" )
|
|
|
|
fdFileOut = open ( fileOut, "w" )
|
2013-01-12 08:57:35 -06:00
|
|
|
|
|
|
|
for line in fdFileIn.readlines():
|
|
|
|
stable = False
|
|
|
|
substituted0 = line
|
|
|
|
|
|
|
|
while not stable:
|
2015-04-07 17:13:27 -05:00
|
|
|
substituted1 = re.sub ( r"@revdate@" , self.revDate, substituted0 )
|
|
|
|
substituted1 = re.sub ( r"@githash@" , self.gitHash, substituted1 )
|
|
|
|
substituted1 = re.sub ( r"@coriolisTop@", "/usr" , substituted1 )
|
2013-01-12 08:57:35 -06:00
|
|
|
if substituted0 == substituted1: stable = True
|
|
|
|
else: substituted0 = substituted1
|
|
|
|
|
2015-04-07 17:33:26 -05:00
|
|
|
fdFileOut.write ( substituted0 )
|
2013-01-12 08:57:35 -06:00
|
|
|
|
|
|
|
fdFileIn.close ()
|
2015-04-07 17:33:26 -05:00
|
|
|
fdFileOut.close ()
|
2013-01-12 08:57:35 -06:00
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def _doSpec ( self ):
|
|
|
|
self._configure ( self.specFileIn, self.specFile )
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def _doDebChangelog ( self ):
|
|
|
|
self._configure ( self.debChangelogIn, self.debChangelog )
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def _execute ( self, command, error ):
|
Groudwork for routing density driven placement. Compliance with clang 5.0.1.
This commit contains two set of features that should have been commited
separately.
1. Compliance with clang 5.0.1, tested with the RedHat collection
llvm-toolset-7. This allow Coriolis to be compiled under Darwin (MacOS)
with Xcode & macports. The bootstrap install system has been modificated
accordingly.
2. The basic support for routing density driven placement. Related
features are:
* Bloat property. Each Occurrence of an Instance can be individually
bloated. This property not attached to any tool to allow the placer and
router to share it as wanted. Nevertheless, it is defined in Etesian.
* BloatProfile in Katana, add individual Bloat properties to Instances
occurrences based on the East & North overflowed edges of each GCell.
* Support in ToolEngine for a "pass number" of a tool. This pass number
is mainly used to make "per pass" measurements. The MeasureSet system
is improved accordingly to support multiple values of a same measure.
* Embryo of "P&R Conductor" to perform the place & route loop until the
design is successfully placed. May be the first brick of a Silicon
Compiler.
* Change: In boostrap/FindBoostrap.cmake, in setup_boost(), added tag to
the python component for macport (ex: python27).
* Change: In boostrap/build.conf, put etesian before anabatic for
instance occurrence BloatProperty dependency.
Added option support for the "llvm-toolset-7" collection to build
against clang 5.0.1.
* Bug: In Hurricane::getRecord( const pair<T,U>& ), the getSlot<> templates
for first & second arguments must be called with <const T> and <const U>
as the pair itself is const (and not simply <T> & <U>).
* Change: In Hurricane::getSlot() temlate, only use "string" arguments and
not const string&, simpler for template argument deduction.
* Bug: In Hurricane::AnalogCellExtension, the StandardPrivateProperty<>
template has a static member "_name". Clang did show that the template
for this static number has to be put inside the namespace where the
template *is defined* (i.e. Hurricane) instead of the namespace where
it is instanciated (i.e. Analog).
* Bug: In Isobar, Matrix_FromListOfList(), PyInt_AsPlacementStatus() must
be put outside the C linkage back in the Isobar C++ namespace (clang).
* Bug: In Hurricane::DBo::~DBo, and derived add a throw() specification
(clang).
* Bug: In Hurricane::RegularLayer::getEnclosure() & setEnclosure(), change
signature so it matches the one of the base class (clang).
* Bug: In Hurricane::CellPrinter, use double brackets for initializer list
(clang).
* Change: In Hurricane::Breakpoint, reverse the meaning of the error level.
Only error level *lesser or equal* than the stop level will be enabled.
* Bug: In CRL/python/helpers/__init__.loadUserSettings(), must put the
current working directory in the sys.path as in certain configuration
it may not be included.
* Bug: In CRL::ApDriver, DumpSegments(), no longer generate segments when
encountering a RoutingPad on a top-level Pin Occurrence. The segment
was generated in the wrong direction, creating DRC violations on the
"mips_core_flat" example.
* Change: In CRL::Measures, partial re-design of the measurements management.
Now, each kind of measure can accept multiple values put in a vector.
The index is intented to match a tool run number.
* Change: In CRL::Histogram, add support for multiple sets of datas,
indexeds with tool run number.
* Change: In CRL::ToolEngine, add support for multiple pass number, add
addMeasure<> templates for the various data-types.
* Change: In CRL::gdsDriver & CRL::gdsParser(), comment out unused GDS record
name constants.
* New: Etesian::BloatProperty, property to attach to Instance occurrences
that contains the extra number of pitch to add to the cell width.
* Bug: In AutoSegment::CompareByDepthLength, the segment length comparison
was wrong, it was always returning true, which broke the "strick weak
ordering" of the comparison.
This was producing a core-dump in GCell::updateDensity() when sorting
a vector<>. The end() iterator was being dereferenced, leading to the
problem.
* Bug: In Katana::DataSymmetric::checkPairing(), the test for segments
whose axis is perpandicular to the symmetry axis was wrong
("!=" instead of "-").
* New: In Katana/GlobalRoute, new ::selectSegments(), selectOverloadedgcells()
and selectBloatedInstances() to automatically select segments from
overloaded edges, overloaded GCells and bloated cells.
* Change: In KatanaEngine, return a more detailed success state, distinguish
between global and detailed.
Add support for multiple routing iterations.
* New: In cumulus/python/plugins/ConductorPlugin.py, embryo of routing
driven placement.
2019-12-08 18:57:44 -06:00
|
|
|
collections = []
|
2019-03-04 07:20:13 -06:00
|
|
|
if self._devtoolset:
|
Groudwork for routing density driven placement. Compliance with clang 5.0.1.
This commit contains two set of features that should have been commited
separately.
1. Compliance with clang 5.0.1, tested with the RedHat collection
llvm-toolset-7. This allow Coriolis to be compiled under Darwin (MacOS)
with Xcode & macports. The bootstrap install system has been modificated
accordingly.
2. The basic support for routing density driven placement. Related
features are:
* Bloat property. Each Occurrence of an Instance can be individually
bloated. This property not attached to any tool to allow the placer and
router to share it as wanted. Nevertheless, it is defined in Etesian.
* BloatProfile in Katana, add individual Bloat properties to Instances
occurrences based on the East & North overflowed edges of each GCell.
* Support in ToolEngine for a "pass number" of a tool. This pass number
is mainly used to make "per pass" measurements. The MeasureSet system
is improved accordingly to support multiple values of a same measure.
* Embryo of "P&R Conductor" to perform the place & route loop until the
design is successfully placed. May be the first brick of a Silicon
Compiler.
* Change: In boostrap/FindBoostrap.cmake, in setup_boost(), added tag to
the python component for macport (ex: python27).
* Change: In boostrap/build.conf, put etesian before anabatic for
instance occurrence BloatProperty dependency.
Added option support for the "llvm-toolset-7" collection to build
against clang 5.0.1.
* Bug: In Hurricane::getRecord( const pair<T,U>& ), the getSlot<> templates
for first & second arguments must be called with <const T> and <const U>
as the pair itself is const (and not simply <T> & <U>).
* Change: In Hurricane::getSlot() temlate, only use "string" arguments and
not const string&, simpler for template argument deduction.
* Bug: In Hurricane::AnalogCellExtension, the StandardPrivateProperty<>
template has a static member "_name". Clang did show that the template
for this static number has to be put inside the namespace where the
template *is defined* (i.e. Hurricane) instead of the namespace where
it is instanciated (i.e. Analog).
* Bug: In Isobar, Matrix_FromListOfList(), PyInt_AsPlacementStatus() must
be put outside the C linkage back in the Isobar C++ namespace (clang).
* Bug: In Hurricane::DBo::~DBo, and derived add a throw() specification
(clang).
* Bug: In Hurricane::RegularLayer::getEnclosure() & setEnclosure(), change
signature so it matches the one of the base class (clang).
* Bug: In Hurricane::CellPrinter, use double brackets for initializer list
(clang).
* Change: In Hurricane::Breakpoint, reverse the meaning of the error level.
Only error level *lesser or equal* than the stop level will be enabled.
* Bug: In CRL/python/helpers/__init__.loadUserSettings(), must put the
current working directory in the sys.path as in certain configuration
it may not be included.
* Bug: In CRL::ApDriver, DumpSegments(), no longer generate segments when
encountering a RoutingPad on a top-level Pin Occurrence. The segment
was generated in the wrong direction, creating DRC violations on the
"mips_core_flat" example.
* Change: In CRL::Measures, partial re-design of the measurements management.
Now, each kind of measure can accept multiple values put in a vector.
The index is intented to match a tool run number.
* Change: In CRL::Histogram, add support for multiple sets of datas,
indexeds with tool run number.
* Change: In CRL::ToolEngine, add support for multiple pass number, add
addMeasure<> templates for the various data-types.
* Change: In CRL::gdsDriver & CRL::gdsParser(), comment out unused GDS record
name constants.
* New: Etesian::BloatProperty, property to attach to Instance occurrences
that contains the extra number of pitch to add to the cell width.
* Bug: In AutoSegment::CompareByDepthLength, the segment length comparison
was wrong, it was always returning true, which broke the "strick weak
ordering" of the comparison.
This was producing a core-dump in GCell::updateDensity() when sorting
a vector<>. The end() iterator was being dereferenced, leading to the
problem.
* Bug: In Katana::DataSymmetric::checkPairing(), the test for segments
whose axis is perpandicular to the symmetry axis was wrong
("!=" instead of "-").
* New: In Katana/GlobalRoute, new ::selectSegments(), selectOverloadedgcells()
and selectBloatedInstances() to automatically select segments from
overloaded edges, overloaded GCells and bloated cells.
* Change: In KatanaEngine, return a more detailed success state, distinguish
between global and detailed.
Add support for multiple routing iterations.
* New: In cumulus/python/plugins/ConductorPlugin.py, embryo of routing
driven placement.
2019-12-08 18:57:44 -06:00
|
|
|
collections.append( 'devtoolset-%d' % self._devtoolset )
|
|
|
|
print 'Using devtoolset-%(v)d (scl enable devtoolset-%(v)d ...)' % {'v':self._devtoolset}
|
|
|
|
if self._llvmtoolset:
|
|
|
|
collections.append( 'llvm-toolset-%d' % self._llvmtoolset )
|
|
|
|
print 'Using llvm-toolset-%(v)d (scl enable llvm-toolset-%(v)d ...)' % {'v':self._llvmtoolset}
|
|
|
|
|
|
|
|
if collections:
|
|
|
|
commandAsString = ''
|
|
|
|
for i in range(len(command)):
|
|
|
|
if i: commandAsString += ' '
|
|
|
|
if ' ' in command[i]: commandAsString += '"'+command[i]+'"'
|
|
|
|
else: commandAsString += command[i]
|
|
|
|
command = [ 'scl', 'enable' ]
|
|
|
|
command += collections
|
|
|
|
command.append( commandAsString )
|
|
|
|
|
2013-01-12 08:57:35 -06:00
|
|
|
sys.stdout.flush ()
|
|
|
|
sys.stderr.flush ()
|
|
|
|
child = subprocess.Popen ( command, env=self._environment, stdout=None )
|
|
|
|
(pid,status) = os.waitpid ( child.pid, 0 )
|
|
|
|
status >>= 8
|
|
|
|
if status != 0:
|
|
|
|
ErrorMessage( status, "%s (status:%d)."%(error,status) ).terminate()
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def _enableTool ( self, tool ):
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def _build ( self, tool ):
|
2016-01-20 17:25:39 -06:00
|
|
|
toolSourceDir = os.path.join ( self.sourceDir, tool.getToolDir() )
|
|
|
|
toolBuildDir = os.path.join ( self.buildDir , tool.name )
|
|
|
|
cmakeInstallDir = os.path.join ( self.installDir, "share", "cmake", "Modules" )
|
2013-01-12 08:57:35 -06:00
|
|
|
# Supplied directly in the CMakeLists.txt.
|
|
|
|
#cmakeModules = os.path.join ( self.installDir, "share", "cmake", "Modules" )
|
|
|
|
|
|
|
|
if not os.path.isdir(toolSourceDir):
|
|
|
|
print ErrorMessage( 0, "Missing tool source directory: \"%s\" (skipped)."%toolSourceDir )
|
|
|
|
return
|
|
|
|
|
|
|
|
if self._rmBuild:
|
|
|
|
print "Removing tool build directory: \"%s\"." % toolBuildDir
|
|
|
|
command = [ "/bin/rm", "-rf", toolBuildDir ]
|
|
|
|
self._execute ( command, "Removing tool build directory" )
|
2014-06-09 17:11:42 -05:00
|
|
|
|
|
|
|
command = [ 'cmake' ]
|
2016-07-13 07:33:21 -05:00
|
|
|
if self._ninja: command += [ "-G", "Ninja" ]
|
Groudwork for routing density driven placement. Compliance with clang 5.0.1.
This commit contains two set of features that should have been commited
separately.
1. Compliance with clang 5.0.1, tested with the RedHat collection
llvm-toolset-7. This allow Coriolis to be compiled under Darwin (MacOS)
with Xcode & macports. The bootstrap install system has been modificated
accordingly.
2. The basic support for routing density driven placement. Related
features are:
* Bloat property. Each Occurrence of an Instance can be individually
bloated. This property not attached to any tool to allow the placer and
router to share it as wanted. Nevertheless, it is defined in Etesian.
* BloatProfile in Katana, add individual Bloat properties to Instances
occurrences based on the East & North overflowed edges of each GCell.
* Support in ToolEngine for a "pass number" of a tool. This pass number
is mainly used to make "per pass" measurements. The MeasureSet system
is improved accordingly to support multiple values of a same measure.
* Embryo of "P&R Conductor" to perform the place & route loop until the
design is successfully placed. May be the first brick of a Silicon
Compiler.
* Change: In boostrap/FindBoostrap.cmake, in setup_boost(), added tag to
the python component for macport (ex: python27).
* Change: In boostrap/build.conf, put etesian before anabatic for
instance occurrence BloatProperty dependency.
Added option support for the "llvm-toolset-7" collection to build
against clang 5.0.1.
* Bug: In Hurricane::getRecord( const pair<T,U>& ), the getSlot<> templates
for first & second arguments must be called with <const T> and <const U>
as the pair itself is const (and not simply <T> & <U>).
* Change: In Hurricane::getSlot() temlate, only use "string" arguments and
not const string&, simpler for template argument deduction.
* Bug: In Hurricane::AnalogCellExtension, the StandardPrivateProperty<>
template has a static member "_name". Clang did show that the template
for this static number has to be put inside the namespace where the
template *is defined* (i.e. Hurricane) instead of the namespace where
it is instanciated (i.e. Analog).
* Bug: In Isobar, Matrix_FromListOfList(), PyInt_AsPlacementStatus() must
be put outside the C linkage back in the Isobar C++ namespace (clang).
* Bug: In Hurricane::DBo::~DBo, and derived add a throw() specification
(clang).
* Bug: In Hurricane::RegularLayer::getEnclosure() & setEnclosure(), change
signature so it matches the one of the base class (clang).
* Bug: In Hurricane::CellPrinter, use double brackets for initializer list
(clang).
* Change: In Hurricane::Breakpoint, reverse the meaning of the error level.
Only error level *lesser or equal* than the stop level will be enabled.
* Bug: In CRL/python/helpers/__init__.loadUserSettings(), must put the
current working directory in the sys.path as in certain configuration
it may not be included.
* Bug: In CRL::ApDriver, DumpSegments(), no longer generate segments when
encountering a RoutingPad on a top-level Pin Occurrence. The segment
was generated in the wrong direction, creating DRC violations on the
"mips_core_flat" example.
* Change: In CRL::Measures, partial re-design of the measurements management.
Now, each kind of measure can accept multiple values put in a vector.
The index is intented to match a tool run number.
* Change: In CRL::Histogram, add support for multiple sets of datas,
indexeds with tool run number.
* Change: In CRL::ToolEngine, add support for multiple pass number, add
addMeasure<> templates for the various data-types.
* Change: In CRL::gdsDriver & CRL::gdsParser(), comment out unused GDS record
name constants.
* New: Etesian::BloatProperty, property to attach to Instance occurrences
that contains the extra number of pitch to add to the cell width.
* Bug: In AutoSegment::CompareByDepthLength, the segment length comparison
was wrong, it was always returning true, which broke the "strick weak
ordering" of the comparison.
This was producing a core-dump in GCell::updateDensity() when sorting
a vector<>. The end() iterator was being dereferenced, leading to the
problem.
* Bug: In Katana::DataSymmetric::checkPairing(), the test for segments
whose axis is perpandicular to the symmetry axis was wrong
("!=" instead of "-").
* New: In Katana/GlobalRoute, new ::selectSegments(), selectOverloadedgcells()
and selectBloatedInstances() to automatically select segments from
overloaded edges, overloaded GCells and bloated cells.
* Change: In KatanaEngine, return a more detailed success state, distinguish
between global and detailed.
Add support for multiple routing iterations.
* New: In cumulus/python/plugins/ConductorPlugin.py, embryo of routing
driven placement.
2019-12-08 18:57:44 -06:00
|
|
|
if self._macports: command += [ "-D", "WITH_MACPORTS:STRING=TRUE" ]
|
2019-03-11 10:01:11 -05:00
|
|
|
if self._noSystemBoost: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE"
|
2019-12-11 15:13:47 -06:00
|
|
|
#, "-D", "BOOST_INCLUDEDIR:STRING=/usr/include/boost169"
|
|
|
|
#, "-D", "BOOST_LIBRARYDIR:STRING=/usr/lib64/boost169"
|
2019-03-11 10:01:11 -05:00
|
|
|
]
|
2016-07-13 07:33:21 -05:00
|
|
|
if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ]
|
|
|
|
if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ]
|
2014-06-09 17:11:42 -05:00
|
|
|
|
2016-01-20 17:25:39 -06:00
|
|
|
command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode
|
2017-12-02 07:30:05 -06:00
|
|
|
#, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared
|
2016-01-20 17:25:39 -06:00
|
|
|
, "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir
|
|
|
|
, "-D", "CMAKE_INSTALL_DIR:STRING=%s" % cmakeInstallDir
|
2019-03-11 10:01:11 -05:00
|
|
|
#, "-D", "CMAKE_MODULE_PATH:STRING=%s" % cmakeModules
|
2019-12-11 15:13:47 -06:00
|
|
|
#, "-D", "Boost_DEBUG:STRING=TRUE"
|
2014-06-09 17:11:42 -05:00
|
|
|
, toolSourceDir ]
|
2013-01-12 08:57:35 -06:00
|
|
|
|
|
|
|
if not os.path.isdir(toolBuildDir):
|
|
|
|
print "Creating tool build directory: \"%s\"." % toolBuildDir
|
|
|
|
os.makedirs ( toolBuildDir )
|
|
|
|
os.chdir ( toolBuildDir )
|
|
|
|
self._execute ( command, "First CMake failed" )
|
|
|
|
|
|
|
|
os.chdir ( toolBuildDir )
|
|
|
|
if self._noCache:
|
|
|
|
cmakeCache = os.path.join(toolBuildDir,"CMakeCache.txt")
|
|
|
|
if os.path.isfile ( cmakeCache ): os.unlink ( cmakeCache )
|
|
|
|
|
2014-06-09 17:11:42 -05:00
|
|
|
command += [ "-D", "BUILD_DOC:STRING=%s" % self._enableDoc
|
|
|
|
, "-D", "CMAKE_VERBOSE_MAKEFILE:STRING=%s" % self._verboseMakefile
|
|
|
|
, "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir
|
2016-01-20 17:25:39 -06:00
|
|
|
, "-D", "CMAKE_INSTALL_DIR:STRING=%s" % cmakeInstallDir
|
2014-06-09 17:11:42 -05:00
|
|
|
]
|
2017-12-02 07:30:05 -06:00
|
|
|
if self.libSuffix: command += [ "-D", "LIB_SUFFIX:STRING=%s" % self.libSuffix ]
|
|
|
|
if self._checkDatabase == 'ON': command += [ "-D", "CHECK_DATABASE:STRING=ON" ]
|
|
|
|
if self._checkDeterminism == 'ON': command += [ "-D", "CHECK_DETERMINISM:STRING=ON" ]
|
2013-01-12 08:57:35 -06:00
|
|
|
command += [ toolSourceDir ]
|
2014-03-15 04:47:37 -05:00
|
|
|
|
2013-01-12 08:57:35 -06:00
|
|
|
self._execute ( command, "Second CMake failed" )
|
|
|
|
|
|
|
|
if self._doBuild:
|
|
|
|
command = [ "make" ]
|
2014-06-09 17:11:42 -05:00
|
|
|
if self._ninja:
|
|
|
|
command = [ "ninja-build" ]
|
2013-01-12 08:57:35 -06:00
|
|
|
#command += [ "DESTDIR=%s" % self.installDir ]
|
|
|
|
command += self._makeArguments
|
2014-06-09 17:11:42 -05:00
|
|
|
print "Make/Ninja command:", command
|
2013-01-12 08:57:35 -06:00
|
|
|
sys.stdout.flush ()
|
|
|
|
self._execute ( command, "Build failed" )
|
|
|
|
return
|
|
|
|
|
|
|
|
|
2015-04-07 17:33:26 -05:00
|
|
|
def gitArchive ( self, projectName ):
|
2015-04-07 17:13:27 -05:00
|
|
|
rawArchive = self.tarballDir+'/'+projectName+'.tar'
|
|
|
|
|
|
|
|
os.chdir ( self.sourceDir+'/'+projectName )
|
|
|
|
command = [ 'git'
|
|
|
|
, 'archive'
|
|
|
|
, '--prefix=%s/' % projectName
|
|
|
|
, '--output=%s' % rawArchive
|
|
|
|
, 'devel'
|
|
|
|
]
|
|
|
|
self._execute ( command, "git archive of project %s" % projectName )
|
|
|
|
|
|
|
|
if not os.path.isdir ( self.archiveDir ):
|
|
|
|
os.mkdir ( self.archiveDir )
|
|
|
|
|
|
|
|
os.chdir ( self.archiveDir )
|
|
|
|
command = [ 'tar', 'xf', rawArchive ]
|
|
|
|
self._execute ( command, "unpacking raw archive %s" % rawArchive )
|
|
|
|
|
2015-04-07 17:33:26 -05:00
|
|
|
command = [ 'rm', rawArchive ]
|
|
|
|
self._execute ( command, "Removing raw archive %s" % rawArchive )
|
|
|
|
|
|
|
|
# Adds files neededs only for packaging purpose.
|
2015-04-08 10:45:45 -05:00
|
|
|
command = [ "/bin/ln", "-s", "./coriolis/bootstrap/Makefile.package"
|
2015-04-07 17:33:26 -05:00
|
|
|
, self.archiveDir+"/Makefile" ]
|
|
|
|
self._execute ( command, "link of %s failed" % "coriolis/boostrap/Makefile.package")
|
|
|
|
|
2015-04-08 10:45:45 -05:00
|
|
|
command = [ "/bin/ln", "-s", "./coriolis/bootstrap/debian", self.archiveDir ]
|
2015-04-07 17:33:26 -05:00
|
|
|
self._execute ( command, "Copying Debian/Ubuntu package control files" )
|
2015-04-08 10:45:45 -05:00
|
|
|
|
|
|
|
# # Remove unpublisheds (yet) tools/files.
|
|
|
|
# for item in self.packageExcludes:
|
|
|
|
# command = [ "/bin/rm", "-rf", os.path.join(self.archiveDir,item) ]
|
|
|
|
# self._execute ( command, "rm of %s failed" % item)
|
|
|
|
#
|
|
|
|
# # Adds files neededs only for packaging purpose.
|
|
|
|
# command = [ "/bin/cp", "-r", os.path.join(self.sourceDir ,"bootstrap","Makefile.package")
|
|
|
|
# , os.path.join(self.archiveDir,"Makefile") ]
|
|
|
|
# self._execute ( command, "copy of %s failed" % "boostrap/Makefile.package")
|
|
|
|
#
|
|
|
|
# os.chdir ( self.archiveDir )
|
|
|
|
# command = [ "/usr/bin/patch", "--remove-empty-files"
|
|
|
|
# , "--no-backup-if-mismatch"
|
|
|
|
# , "-p0", "-i", self.distribPatch ]
|
|
|
|
# self._execute ( command, "patch for distribution command failed" )
|
2015-04-07 17:13:27 -05:00
|
|
|
|
|
|
|
absSourceTarBz2 = '%s/%s' % (self.tarballDir,self.sourceTarBz2)
|
|
|
|
os.chdir ( self.tarballDir )
|
|
|
|
command = [ 'tar', 'jcf', absSourceTarBz2, os.path.basename(self.archiveDir) ]
|
|
|
|
self._execute ( command, "Creating composite archive %s" % absSourceTarBz2 )
|
|
|
|
|
|
|
|
return
|
2013-01-12 08:57:35 -06:00
|
|
|
|
|
|
|
|
|
|
|
def _setEnvironment ( self, systemVariable, userVariable ):
|
|
|
|
if not self._environment.has_key(systemVariable) or self._environment[systemVariable] == "":
|
|
|
|
if not self._environment.has_key(userVariable) or self._environment[userVariable] == "" :
|
|
|
|
self._environment[ systemVariable ] = self.installDir
|
|
|
|
print "[WARNING] Neither <%s> nor <%s> environment variables are sets." \
|
|
|
|
% (systemVariable,userVariable)
|
|
|
|
print " Setting <%s> to <%s>." % (systemVariable,self.installDir)
|
|
|
|
else:
|
|
|
|
self._environment[ systemVariable ] = self._environment[ userVariable ]
|
|
|
|
|
|
|
|
if not self._quiet:
|
|
|
|
print "Setting <%s> to <%s>." % (systemVariable,self._environment[systemVariable])
|
|
|
|
if self._environment.has_key(userVariable):
|
|
|
|
print "Transmitting <%s> as <%s>." % (userVariable,self._environment[userVariable])
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def _commandTemplate ( self, tools, projects, command ):
|
2014-12-05 11:50:15 -06:00
|
|
|
if self._clang:
|
Groudwork for routing density driven placement. Compliance with clang 5.0.1.
This commit contains two set of features that should have been commited
separately.
1. Compliance with clang 5.0.1, tested with the RedHat collection
llvm-toolset-7. This allow Coriolis to be compiled under Darwin (MacOS)
with Xcode & macports. The bootstrap install system has been modificated
accordingly.
2. The basic support for routing density driven placement. Related
features are:
* Bloat property. Each Occurrence of an Instance can be individually
bloated. This property not attached to any tool to allow the placer and
router to share it as wanted. Nevertheless, it is defined in Etesian.
* BloatProfile in Katana, add individual Bloat properties to Instances
occurrences based on the East & North overflowed edges of each GCell.
* Support in ToolEngine for a "pass number" of a tool. This pass number
is mainly used to make "per pass" measurements. The MeasureSet system
is improved accordingly to support multiple values of a same measure.
* Embryo of "P&R Conductor" to perform the place & route loop until the
design is successfully placed. May be the first brick of a Silicon
Compiler.
* Change: In boostrap/FindBoostrap.cmake, in setup_boost(), added tag to
the python component for macport (ex: python27).
* Change: In boostrap/build.conf, put etesian before anabatic for
instance occurrence BloatProperty dependency.
Added option support for the "llvm-toolset-7" collection to build
against clang 5.0.1.
* Bug: In Hurricane::getRecord( const pair<T,U>& ), the getSlot<> templates
for first & second arguments must be called with <const T> and <const U>
as the pair itself is const (and not simply <T> & <U>).
* Change: In Hurricane::getSlot() temlate, only use "string" arguments and
not const string&, simpler for template argument deduction.
* Bug: In Hurricane::AnalogCellExtension, the StandardPrivateProperty<>
template has a static member "_name". Clang did show that the template
for this static number has to be put inside the namespace where the
template *is defined* (i.e. Hurricane) instead of the namespace where
it is instanciated (i.e. Analog).
* Bug: In Isobar, Matrix_FromListOfList(), PyInt_AsPlacementStatus() must
be put outside the C linkage back in the Isobar C++ namespace (clang).
* Bug: In Hurricane::DBo::~DBo, and derived add a throw() specification
(clang).
* Bug: In Hurricane::RegularLayer::getEnclosure() & setEnclosure(), change
signature so it matches the one of the base class (clang).
* Bug: In Hurricane::CellPrinter, use double brackets for initializer list
(clang).
* Change: In Hurricane::Breakpoint, reverse the meaning of the error level.
Only error level *lesser or equal* than the stop level will be enabled.
* Bug: In CRL/python/helpers/__init__.loadUserSettings(), must put the
current working directory in the sys.path as in certain configuration
it may not be included.
* Bug: In CRL::ApDriver, DumpSegments(), no longer generate segments when
encountering a RoutingPad on a top-level Pin Occurrence. The segment
was generated in the wrong direction, creating DRC violations on the
"mips_core_flat" example.
* Change: In CRL::Measures, partial re-design of the measurements management.
Now, each kind of measure can accept multiple values put in a vector.
The index is intented to match a tool run number.
* Change: In CRL::Histogram, add support for multiple sets of datas,
indexeds with tool run number.
* Change: In CRL::ToolEngine, add support for multiple pass number, add
addMeasure<> templates for the various data-types.
* Change: In CRL::gdsDriver & CRL::gdsParser(), comment out unused GDS record
name constants.
* New: Etesian::BloatProperty, property to attach to Instance occurrences
that contains the extra number of pitch to add to the cell width.
* Bug: In AutoSegment::CompareByDepthLength, the segment length comparison
was wrong, it was always returning true, which broke the "strick weak
ordering" of the comparison.
This was producing a core-dump in GCell::updateDensity() when sorting
a vector<>. The end() iterator was being dereferenced, leading to the
problem.
* Bug: In Katana::DataSymmetric::checkPairing(), the test for segments
whose axis is perpandicular to the symmetry axis was wrong
("!=" instead of "-").
* New: In Katana/GlobalRoute, new ::selectSegments(), selectOverloadedgcells()
and selectBloatedInstances() to automatically select segments from
overloaded edges, overloaded GCells and bloated cells.
* Change: In KatanaEngine, return a more detailed success state, distinguish
between global and detailed.
Add support for multiple routing iterations.
* New: In cumulus/python/plugins/ConductorPlugin.py, embryo of routing
driven placement.
2019-12-08 18:57:44 -06:00
|
|
|
self._environment[ 'CC' ] = 'clang'
|
|
|
|
self._environment[ 'CXX' ] = 'clang++'
|
2019-03-04 07:20:13 -06:00
|
|
|
if self._devtoolset:
|
|
|
|
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/rh/devtoolset-%d/root/usr/include' % self._devtoolset
|
|
|
|
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/rh/devtoolset-%d/root/usr/lib' % self._devtoolset
|
2016-07-13 07:33:21 -05:00
|
|
|
if self._macports:
|
|
|
|
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/local/include'
|
|
|
|
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/local/lib'
|
2014-03-15 04:47:37 -05:00
|
|
|
|
2013-01-12 08:57:35 -06:00
|
|
|
# Set or guess the various projects TOP environment variables.
|
|
|
|
for project in self.projects:
|
|
|
|
topVariable = "%s_TOP" % project.getName().upper()
|
|
|
|
topUserVariable = "%s_USER_TOP" % project.getName().upper()
|
|
|
|
self._setEnvironment ( topVariable, topUserVariable )
|
|
|
|
|
|
|
|
if tools:
|
|
|
|
# Checks if the requested tools are in the various projects.
|
|
|
|
self.standalones = tools
|
|
|
|
for project in self.projects:
|
|
|
|
self.standalones = project.activate ( self.standalones )
|
|
|
|
for tool in self.standalones:
|
|
|
|
print "[WARNING] Tool \"%s\" is not part of any project." % tool
|
|
|
|
|
|
|
|
if projects:
|
|
|
|
for projectName in projects:
|
|
|
|
project = self.getProject ( projectName )
|
|
|
|
if not project:
|
|
|
|
ErrorMessage( 1, "No project of name \"%s\"."%projectName ).terminate()
|
|
|
|
project.activateAll()
|
|
|
|
|
|
|
|
if not tools and not projects:
|
|
|
|
for project in self.projects:
|
|
|
|
project.activateAll ()
|
|
|
|
|
|
|
|
for project in self.projects:
|
|
|
|
for tool in project.getActives():
|
Cleanup after SVN importation, <ccb> builder script adaptation.
Project hierarchy reorganisation:
* With svn, we were doing a tool by tool checkout, suppressing the
whole repository hierarchy level.
* The tools were also grouped, inside one repository, into multiple
projects (<bootstrap>, <vlsisapd>, <coriolis>).
* We do not want to split up each tool into a separate repository,
given their tight integration (except for vlsisapd).
* We choose to simplify, and consider all tools in a svn repository
one project. Due to the way Git clone repositories, the directory
containing the project is now to be seen under "src/".
CMake modifications:
* Now that the <vlsisapd> and <bootstrap> projects are merged into
coriolis, modificate the top CMakeLists.txt of each tool to uses
only Coriolis (and bootstrap hard wired).
CCB compile script modifications:
* Uses the new source tree hierarchy, with the project directory
inserted.
* Remove (comment) all parts relateds to svn managment.
* Git is sufficiently simple so that we do not want to integrate
command shortcut into the script.
SVN cleanup:
* Remove the obsolete <chamsin> tool, that has become the full fledged
<chams> project long time ago.
2014-02-26 11:24:41 -06:00
|
|
|
print "\nProcessing tool: \"%s\"." % tool.name
|
2013-01-12 08:57:35 -06:00
|
|
|
getattr(self,command) ( tool )
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def enable ( self, tools, projects ):
|
|
|
|
self._commandTemplate ( tools, projects, "_enableTool" )
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def enabledTools ( self ):
|
|
|
|
tools = []
|
|
|
|
for project in self.projects:
|
|
|
|
tools += project.getActives()
|
|
|
|
return tools
|
|
|
|
|
|
|
|
|
|
|
|
def build ( self, tools, projects ):
|
|
|
|
self._commandTemplate ( tools, projects, "_build" )
|
|
|
|
return
|
|
|
|
|
|
|
|
|
2015-04-07 17:13:27 -05:00
|
|
|
def gitTarball ( self, tools, projects ):
|
|
|
|
if self.gitHash == "x":
|
|
|
|
self._guessGitHash ( self.getProject(projects[0]) )
|
|
|
|
|
|
|
|
self._doSpec ()
|
Cleanup after SVN importation, <ccb> builder script adaptation.
Project hierarchy reorganisation:
* With svn, we were doing a tool by tool checkout, suppressing the
whole repository hierarchy level.
* The tools were also grouped, inside one repository, into multiple
projects (<bootstrap>, <vlsisapd>, <coriolis>).
* We do not want to split up each tool into a separate repository,
given their tight integration (except for vlsisapd).
* We choose to simplify, and consider all tools in a svn repository
one project. Due to the way Git clone repositories, the directory
containing the project is now to be seen under "src/".
CMake modifications:
* Now that the <vlsisapd> and <bootstrap> projects are merged into
coriolis, modificate the top CMakeLists.txt of each tool to uses
only Coriolis (and bootstrap hard wired).
CCB compile script modifications:
* Uses the new source tree hierarchy, with the project directory
inserted.
* Remove (comment) all parts relateds to svn managment.
* Git is sufficiently simple so that we do not want to integrate
command shortcut into the script.
SVN cleanup:
* Remove the obsolete <chamsin> tool, that has become the full fledged
<chams> project long time ago.
2014-02-26 11:24:41 -06:00
|
|
|
# self._doDebChangelog ()
|
2015-04-07 17:13:27 -05:00
|
|
|
|
|
|
|
if os.path.isdir(self.tarballDir):
|
|
|
|
print "Removing previous tarball directory: \"%s\"." % self.tarballDir
|
|
|
|
command = [ "/bin/rm", "-rf", self.tarballDir ]
|
|
|
|
self._execute ( command, "Removing top export (tarball) directory" )
|
|
|
|
|
|
|
|
print "Creating tarball directory: \"%s\"." % self.tarballDir
|
|
|
|
os.makedirs ( self.tarballDir )
|
2015-04-07 17:33:26 -05:00
|
|
|
self.gitArchive ( projects[0] )
|
2015-04-07 17:13:27 -05:00
|
|
|
|
|
|
|
return
|
2013-01-12 08:57:35 -06:00
|
|
|
|
|
|
|
|
|
|
|
def userTarball ( self, tools, projects ):
|
|
|
|
self.enable( tools, projects )
|
|
|
|
|
|
|
|
userSourceTarBz2 = os.path.join ( self.tarballDir
|
|
|
|
, datetime.date.today().strftime('%s-%s-%%Y%%m%%d.tar.bz2'%
|
|
|
|
(self.packageName
|
|
|
|
,self.packageVersion)) )
|
|
|
|
|
|
|
|
excludes = []
|
|
|
|
for exclude in self.packageExcludes:
|
|
|
|
excludes += [ '--exclude='+exclude ]
|
|
|
|
|
|
|
|
os.chdir ( self.sourceDir )
|
|
|
|
command = [ "/bin/tar"
|
|
|
|
, "--exclude-backups"
|
|
|
|
, "--exclude-vcs"
|
|
|
|
, "--transform=s,^,%s/src/,"%self.projectDir ] \
|
|
|
|
+ excludes \
|
|
|
|
+ [ "-jcvf", userSourceTarBz2 ] \
|
|
|
|
+ self.enabledTools()
|
|
|
|
self._execute ( command, "tar command failed" )
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def doRpm ( self ):
|
2015-04-07 17:13:27 -05:00
|
|
|
self.gitTarball ( [], self.packageProjects )
|
2013-01-12 08:57:35 -06:00
|
|
|
|
|
|
|
for rpmDir in [ "SOURCES", "SPECS", "BUILD", "tmp"
|
|
|
|
, "SRPMS", "RPMS/i386", "RPMS/i686", "RPMS/x86_64" ]:
|
2015-04-08 10:45:45 -05:00
|
|
|
rpmFullDir = os.path.join ( self.rpmbuildDir, rpmDir )
|
|
|
|
if not os.path.isdir(rpmFullDir):
|
|
|
|
os.makedirs ( rpmFullDir )
|
|
|
|
else:
|
|
|
|
for entry in os.listdir(rpmFullDir):
|
|
|
|
path = os.path.join( rpmFullDir, entry )
|
|
|
|
if os.path.islink(path):
|
|
|
|
realpath = os.path.realpath( os.readlink(path) )
|
|
|
|
if not os.path.isfile(realpath):
|
|
|
|
print 'Remove obsolete link: <%s>.' % path
|
|
|
|
os.unlink( path )
|
2013-01-12 08:57:35 -06:00
|
|
|
|
2015-04-07 17:13:27 -05:00
|
|
|
rpmSpecFile = os.path.join ( self.rpmbuildDir, "SPECS" , "coriolis2.spec" )
|
2013-01-12 08:57:35 -06:00
|
|
|
rpmSourceFile = os.path.join ( self.rpmbuildDir, "SOURCES", self.sourceTarBz2 )
|
2015-04-07 17:13:27 -05:00
|
|
|
sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 )
|
|
|
|
|
|
|
|
if os.path.isfile ( rpmSpecFile ):
|
|
|
|
os.unlink ( rpmSpecFile )
|
|
|
|
os.symlink ( self.specFile, rpmSpecFile )
|
|
|
|
|
2013-01-12 08:57:35 -06:00
|
|
|
if not os.path.islink ( rpmSourceFile ):
|
|
|
|
os.symlink ( sourceFile, rpmSourceFile )
|
|
|
|
|
|
|
|
os.chdir ( self.rpmbuildDir )
|
2015-04-07 17:13:27 -05:00
|
|
|
|
2013-01-12 08:57:35 -06:00
|
|
|
command = [ "/usr/bin/rpmbuild"
|
|
|
|
, "--define", "_topdir %s" % self.rpmbuildDir
|
|
|
|
, "--define", "_tmppath %s" % self.tmppathDir
|
2015-04-08 10:45:45 -05:00
|
|
|
#, "--define", "_enable_debug_packages 0"
|
|
|
|
, "--with", "binarytar" ]
|
2019-03-04 07:20:13 -06:00
|
|
|
if self._devtoolset:
|
|
|
|
command += [ "--define", "scl devtoolset-%d"%self._devtoolset ]
|
2015-04-08 10:45:45 -05:00
|
|
|
command += [ "-ba", "--clean", rpmSpecFile ]
|
|
|
|
|
2013-01-12 08:57:35 -06:00
|
|
|
self._execute ( command, "Rebuild rpm packages" )
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def doDeb ( self ):
|
|
|
|
self.svnTarball ( [], self.packageProjects )
|
|
|
|
|
|
|
|
if not os.path.isdir(self.debbuildDir):
|
|
|
|
os.makedirs ( self.debbuildDir )
|
|
|
|
|
|
|
|
os.chdir ( self.debbuildDir )
|
|
|
|
sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 )
|
Cleanup after SVN importation, <ccb> builder script adaptation.
Project hierarchy reorganisation:
* With svn, we were doing a tool by tool checkout, suppressing the
whole repository hierarchy level.
* The tools were also grouped, inside one repository, into multiple
projects (<bootstrap>, <vlsisapd>, <coriolis>).
* We do not want to split up each tool into a separate repository,
given their tight integration (except for vlsisapd).
* We choose to simplify, and consider all tools in a svn repository
one project. Due to the way Git clone repositories, the directory
containing the project is now to be seen under "src/".
CMake modifications:
* Now that the <vlsisapd> and <bootstrap> projects are merged into
coriolis, modificate the top CMakeLists.txt of each tool to uses
only Coriolis (and bootstrap hard wired).
CCB compile script modifications:
* Uses the new source tree hierarchy, with the project directory
inserted.
* Remove (comment) all parts relateds to svn managment.
* Git is sufficiently simple so that we do not want to integrate
command shortcut into the script.
SVN cleanup:
* Remove the obsolete <chamsin> tool, that has become the full fledged
<chams> project long time ago.
2014-02-26 11:24:41 -06:00
|
|
|
debOrigFile = os.path.join ( self.debbuildDir, "coriolis2_1.0.%s.orig.tar.bz2" % self.gitHash )
|
2013-01-12 08:57:35 -06:00
|
|
|
if not os.path.islink(debOrigFile):
|
|
|
|
os.link ( sourceFile, debOrigFile )
|
|
|
|
|
|
|
|
command = [ "/bin/tar", "jxf", debOrigFile ]
|
|
|
|
self._execute ( command, "Unpacking pristine sources" )
|
|
|
|
|
|
|
|
#command = [ "/bin/cp", "-r", self.debianDir, "." ]
|
|
|
|
#self._execute ( command, "Copying Debian/Ubuntu package control files" )
|
|
|
|
|
Cleanup after SVN importation, <ccb> builder script adaptation.
Project hierarchy reorganisation:
* With svn, we were doing a tool by tool checkout, suppressing the
whole repository hierarchy level.
* The tools were also grouped, inside one repository, into multiple
projects (<bootstrap>, <vlsisapd>, <coriolis>).
* We do not want to split up each tool into a separate repository,
given their tight integration (except for vlsisapd).
* We choose to simplify, and consider all tools in a svn repository
one project. Due to the way Git clone repositories, the directory
containing the project is now to be seen under "src/".
CMake modifications:
* Now that the <vlsisapd> and <bootstrap> projects are merged into
coriolis, modificate the top CMakeLists.txt of each tool to uses
only Coriolis (and bootstrap hard wired).
CCB compile script modifications:
* Uses the new source tree hierarchy, with the project directory
inserted.
* Remove (comment) all parts relateds to svn managment.
* Git is sufficiently simple so that we do not want to integrate
command shortcut into the script.
SVN cleanup:
* Remove the obsolete <chamsin> tool, that has become the full fledged
<chams> project long time ago.
2014-02-26 11:24:41 -06:00
|
|
|
packageDir = os.path.join ( self.debbuildDir, "coriolis2-1.0.%s" % self.gitHash )
|
2013-01-12 08:57:35 -06:00
|
|
|
os.chdir ( packageDir )
|
|
|
|
|
|
|
|
self._environment["CFLAGS" ] = "-O2"
|
|
|
|
self._environment["CXXFLAGS"] = "-O2"
|
|
|
|
command = [ "/usr/bin/debuild", "-us", "-uc" ]
|
|
|
|
self._execute ( command, "Rebuild Debian packages" )
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
2013-01-12 09:10:55 -06:00
|
|
|
def getProject ( self, name ): return self._conf.getProject(name)
|
2013-01-12 08:57:35 -06:00
|
|
|
def loadConfiguration ( self, confFile ): self._conf.load( confFile )
|
|
|
|
def showConfiguration ( self ): self._conf.show()
|
|
|
|
|
|
|
|
|