diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 21:32:20 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 21:32:20 +0000 |
commit | 14d15d4d94826de272025415192e9f9edaf733c1 (patch) | |
tree | 67a34aa679a42bfae84f9792f43b863128ca2243 | |
parent | bdad42a47f2dfa5783554844d54337454256a0a3 (diff) | |
download | chromium_src-14d15d4d94826de272025415192e9f9edaf733c1.zip chromium_src-14d15d4d94826de272025415192e9f9edaf733c1.tar.gz chromium_src-14d15d4d94826de272025415192e9f9edaf733c1.tar.bz2 |
Get SCons building Windows again without having to Import()/re-Export(): use the $PLATFORM construction variable supplied in the construction environment instead of passing around our own PLATFORM variable in Python.
R=keunwoo,evanm
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/SConscript.main.linux | 5 | ||||
-rw-r--r-- | chrome/SConstruct | 15 | ||||
-rw-r--r-- | third_party/bsdiff/SConscript | 4 | ||||
-rw-r--r-- | third_party/bspatch/SConscript | 5 | ||||
-rw-r--r-- | third_party/bzip2/SConscript | 4 | ||||
-rw-r--r-- | third_party/libjpeg/SConscript | 4 | ||||
-rw-r--r-- | third_party/libpng/SConscript | 4 | ||||
-rw-r--r-- | third_party/lzma_sdk/SConscript | 23 | ||||
-rw-r--r-- | third_party/zlib/SConscript | 4 |
9 files changed, 21 insertions, 47 deletions
diff --git a/build/SConscript.main.linux b/build/SConscript.main.linux index 3f50012..36e02e0 100644 --- a/build/SConscript.main.linux +++ b/build/SConscript.main.linux @@ -37,9 +37,6 @@ import shutil import sys -Import('PLATFORM') - - # Base ------------------------------------------------------------------- base_env = Environment( @@ -90,7 +87,7 @@ env = base_env.Clone() for sconscript_dir, target_subdir in sconscript_and_target_subdirs: env.SConscript(os.path.join(sconscript_dir, 'SConscript'), - exports=['env', 'PLATFORM'], + exports=['env'], variant_dir=os.path.join('$TARGET_ROOT', target_subdir), duplicate=0 ) diff --git a/chrome/SConstruct b/chrome/SConstruct index f8ea244..60245b9 100644 --- a/chrome/SConstruct +++ b/chrome/SConstruct @@ -29,23 +29,12 @@ build_component = 'chrome'
-# TODO(keunwoo): This is an ugly hack to reify the result of scons's built-in
-# platform detection as a variable (the RES attribute is only available
-# under MSWindows). Once rspangler+sgk merge better idioms into Chrome's
-# site scons, we should be able to remove this.
-try:
- Environment().RES
-except AttributeError:
- PLATFORM = 'LINUX'
-else:
- PLATFORM = 'WINDOWS'
-
# TODO(keunwoo): Merge ../build/SConscript.main.linux back to SConscript.main,
# then remove this.
-if PLATFORM == 'LINUX':
+if Environment()['PLATFORM'] == 'posix':
SCONSCRIPT_MAIN = '../build/SConscript.main.linux'
else:
SCONSCRIPT_MAIN = '../build/SConscript.main'
SConscript(SCONSCRIPT_MAIN,
- exports=['build_component', 'PLATFORM'])
+ exports=['build_component'])
diff --git a/third_party/bsdiff/SConscript b/third_party/bsdiff/SConscript index 424139c..57524e8 100644 --- a/third_party/bsdiff/SConscript +++ b/third_party/bsdiff/SConscript @@ -28,8 +28,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('PLATFORM')
-
Import('env')
env = env.Clone()
@@ -40,7 +38,7 @@ env.Prepend( ]
)
-if PLATFORM == 'WINDOWS':
+if env['PLATFORM'] == 'win32':
env.Append(
CCFLAGS = [
'/TP',
diff --git a/third_party/bspatch/SConscript b/third_party/bspatch/SConscript index cdd079f..99fdfea 100644 --- a/third_party/bspatch/SConscript +++ b/third_party/bspatch/SConscript @@ -28,8 +28,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('PLATFORM')
-
Import('env')
env = env.Clone(
@@ -46,7 +44,8 @@ env.Append( '_LZMA_IN_CB',
],
)
-if PLATFORM == 'WINDOWS':
+
+if env['PLATFORM'] == 'win32':
env.Append(
CCFLAGS = [
'/TP',
diff --git a/third_party/bzip2/SConscript b/third_party/bzip2/SConscript index 0ff0fab..bb83054 100644 --- a/third_party/bzip2/SConscript +++ b/third_party/bzip2/SConscript @@ -28,13 +28,11 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('PLATFORM')
-
Import('env')
env = env.Clone()
-if PLATFORM == 'WINDOWS':
+if env['PLATFORM'] == 'win32':
env.Append(
CCFLAGS = [
'/TC',
diff --git a/third_party/libjpeg/SConscript b/third_party/libjpeg/SConscript index 3bd48d4..8010345 100644 --- a/third_party/libjpeg/SConscript +++ b/third_party/libjpeg/SConscript @@ -28,8 +28,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('PLATFORM')
-
Import('env')
env = env.Clone()
@@ -40,7 +38,7 @@ env.Prepend( ],
)
-if PLATFORM == 'WINDOWS':
+if env['PLATFORM'] == 'win32':
env.Append(
CCFLAGS = [
'/TC',
diff --git a/third_party/libpng/SConscript b/third_party/libpng/SConscript index dd3066a..dafada4 100644 --- a/third_party/libpng/SConscript +++ b/third_party/libpng/SConscript @@ -28,8 +28,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('PLATFORM')
-
Import('env')
env = env.Clone()
@@ -41,7 +39,7 @@ env.Prepend( ],
)
-if PLATFORM == 'WINDOWS':
+if env['PLATFORM'] == 'win32':
env.Append(
CCFLAGS = [
'/TP',
diff --git a/third_party/lzma_sdk/SConscript b/third_party/lzma_sdk/SConscript index 537d45f..de35112 100644 --- a/third_party/lzma_sdk/SConscript +++ b/third_party/lzma_sdk/SConscript @@ -28,7 +28,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Import('env')
-Import('PLATFORM')
env = env.Clone(
)
@@ -47,7 +46,7 @@ env.Append( ],
)
-if PLATFORM == 'WINDOWS':
+if env['PLATFORM'] == 'win32':
env.Append(
CCFLAGS = [
'/TC',
@@ -56,18 +55,18 @@ if PLATFORM == 'WINDOWS': )
input_files = [
- 'Compress/Lzma/LzmaDecode.c',
- 'Archive/7z/7zMethodID.c',
- 'Archive/7z/7zItem.c',
- 'Archive/7z/7zIn.c',
- 'Archive/7z/7zHeader.c',
- 'Archive/7z/7zExtract.c',
- 'Archive/7z/7zDecode.c',
- 'Archive/7z/7zBuffer.c',
+ '7zCrc.c',
'Archive/7z/7zAlloc.c',
- 'Compress/Branch/BranchX86_2.c',
+ 'Archive/7z/7zBuffer.c',
+ 'Archive/7z/7zDecode.c',
+ 'Archive/7z/7zExtract.c',
+ 'Archive/7z/7zHeader.c',
+ 'Archive/7z/7zIn.c',
+ 'Archive/7z/7zItem.c',
+ 'Archive/7z/7zMethodID.c',
'Compress/Branch/BranchX86.c',
- '7zCrc.c',
+ 'Compress/Branch/BranchX86_2.c',
+ 'Compress/Lzma/LzmaDecode.c',
]
env.StaticLibrary('lzma_sdk', input_files)
diff --git a/third_party/zlib/SConscript b/third_party/zlib/SConscript index 08f66c6..7f5aab6 100644 --- a/third_party/zlib/SConscript +++ b/third_party/zlib/SConscript @@ -28,13 +28,11 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('PLATFORM')
-
Import('env')
env = env.Clone()
-if PLATFORM == 'WINDOWS':
+if env['PLATFORM'] == 'win32':
env.Append(
CCFLAGS = [
'/TC',
|