Browse Source

waf: upgrade to waifu 1.1.0

pull/2/head
Alibek Omarov 4 years ago
parent
commit
b278751834
  1. 4
      engine/wscript
  2. 37
      scripts/waifulib/enforce_pic.py
  3. 14
      waf

4
engine/wscript

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
# mittorn, 2018
from waflib import Logs
from waflib.extras import pthread
import os
top = '.'
@ -69,8 +70,7 @@ def configure(conf): @@ -69,8 +70,7 @@ def configure(conf):
conf.define('XASH_NO_LIBDL',1)
if not conf.env.DEST_OS in ['win32', 'android'] and not conf.options.NO_ASYNC_RESOLVE:
conf.load('pthreads')
conf.check_pthread_flag()
conf.check_pthreads()
if hasattr(conf.options, 'DLLEMU'):
conf.define_cond('XASH_DLL_LOADER', conf.options.DLLEMU)

37
scripts/waifulib/enforce_pic.py

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
# encoding: utf-8
# enforce_pic.py -- enforcing PIC if requested
# Copyright (C) 2021 a1batross
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
from waflib.Configure import conf
def options(opt):
pass
def configure(conf):
pass
@conf
def check_pic(conf, enable):
if enable:
# Every static library must have fPIC
if conf.env.DEST_OS != 'win32' and '-fPIC' in conf.env.CFLAGS_cshlib:
conf.env.append_unique('CFLAGS_cstlib', '-fPIC')
conf.env.append_unique('CXXFLAGS_cxxstlib', '-fPIC')
else:
if '-fPIC' in conf.env.CFLAGS_cshlib:
conf.env.CFLAGS_cshlib.remove('-fPIC')
if '-fPIC' in conf.env.CXXFLAGS_cshlib:
conf.env.CXXFLAGS_cxxshlib.remove('-fPIC')
if '-fPIC' in conf.env.CFLAGS_MACBUNDLE:
conf.env.CFLAGS_MACBUNDLE.remove('-fPIC')
if '-fPIC' in conf.env.CXXFLAGS_MACBUNDLE:
conf.env.CXXFLAGS_MACBUNDLE.remove('-fPIC')

14
waf vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save