Browse Source

scons: Print a deprecation warning about using scons on not windows

At this point meson should be able to handle all of the non-windows
platforms just fine; we'd like to be able to stop maintaining scons for
those platforms sooner than later.

Reviewed-by: Eric Anholt <eric@anholt.net>
tags/19.3-branchpoint
Dylan Baker 7 years ago
parent
commit
54053bc8d0
4 changed files with 19 additions and 4 deletions
  1. 2
    2
      .gitlab-ci.yml
  2. 2
    2
      .gitlab-ci/scons-build.sh
  3. 14
    0
      SConstruct
  4. 1
    0
      common.py

+ 2
- 2
.gitlab-ci.yml View File

extends: .scons-build extends: .scons-build
variables: variables:
SCONS_TARGET: "llvm=1" SCONS_TARGET: "llvm=1"
SCONS_CHECK_COMMAND: "scons llvm=1 check"
SCONS_CHECK_COMMAND: "scons llvm=1 force_scons=1 check"
script: script:
- SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check" .gitlab-ci/scons-build.sh
- SCONS_TARGET="" SCONS_CHECK_COMMAND="scons check force_scons=1" .gitlab-ci/scons-build.sh
- LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh - LLVM_VERSION=6.0 .gitlab-ci/scons-build.sh
- LLVM_VERSION=7 .gitlab-ci/scons-build.sh - LLVM_VERSION=7 .gitlab-ci/scons-build.sh
- LLVM_VERSION=8 .gitlab-ci/scons-build.sh - LLVM_VERSION=8 .gitlab-ci/scons-build.sh

+ 2
- 2
.gitlab-ci/scons-build.sh View File

fi fi


rm -rf build rm -rf build
scons $SCONS_TARGET
eval $SCONS_CHECK_COMMAND
scons $SCONS_TARGET force_scons=on
eval $SCONS_CHECK_COMMAND

+ 14
- 0
SConstruct View File



Help(opts.GenerateHelpText(env)) Help(opts.GenerateHelpText(env))



#######################################################################
# Print a deprecation warning for using scons on non-windows

if common.host_platform != 'windows':
force = ARGUMENTS['force_scons']
if force.lower() not in {'false', 'off', 'none', '0', 'n'}:
print("WARNING: Scons is deprecated for non-windows platforms (including cygwin) "
"please use meson instead.", file=sys.stderr)
else:
print("ERROR: Scons is deprecated for non-windows platforms (including cygwin) "
"please use meson instead. If you really need to use scons you "
"can add `force_scons=1` to the scons command line.", file=sys.stderr)
sys.exit(1)
####################################################################### #######################################################################
# Environment setup # Environment setup



+ 1
- 0
common.py View File

opts.Add(BoolOption('asan', 'enable Address Sanitizer', 'no')) opts.Add(BoolOption('asan', 'enable Address Sanitizer', 'no'))
opts.Add('toolchain', 'compiler toolchain', default_toolchain) opts.Add('toolchain', 'compiler toolchain', default_toolchain)
opts.Add(BoolOption('llvm', 'use LLVM', default_llvm)) opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
opts.Add(BoolOption('force_scons', 'Force enable scons on deprecated platforms', 'false'))
opts.Add(BoolOption('openmp', 'EXPERIMENTAL: compile with openmp (swrast)', opts.Add(BoolOption('openmp', 'EXPERIMENTAL: compile with openmp (swrast)',
'no')) 'no'))
opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes')) opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes'))

Loading…
Cancel
Save