VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /proc/self/root/usr/local/lib/node_modules/mediasoup/worker/deps/gyp/test/no-cpp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/local/lib/node_modules/mediasoup/worker/deps/gyp/test/no-cpp/gyptest-no-cpp.py
#!/usr/bin/env python

# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""
Checks that C-only targets aren't linked against libstdc++.
"""

import TestGyp

import re
import subprocess
import sys

# set |match| to ignore build stderr output.
test = TestGyp.TestGyp(match = lambda a, b: True)
if (sys.platform != 'win32' and
    not (sys.platform == 'darwin' and test.format == 'make')):
  # TODO: Does a test like this make sense with Windows?

  CHDIR = 'src'
  test.run_gyp('test.gyp', chdir=CHDIR)
  test.build('test.gyp', 'no_cpp', chdir=CHDIR)

  def LinksLibStdCpp(path):
    path = test.built_file_path(path, chdir=CHDIR)
    if sys.platform == 'darwin':
      proc = subprocess.Popen(['otool', '-L', path], stdout=subprocess.PIPE)
    else:
      proc = subprocess.Popen(['ldd', path], stdout=subprocess.PIPE)
    output = proc.communicate()[0].decode('utf-8')
    assert not proc.returncode
    return 'libstdc++' in output or 'libc++' in output

  if LinksLibStdCpp('no_cpp'):
    test.fail_test()

  # Make, ninja, and CMake pick the compiler driver based on transitive
  # checks. Xcode doesn't.
  build_error_code = {
    'xcode': 65,  # EX_DATAERR, see `man sysexits`
    'make': 0,
    'ninja': 0,
    'cmake': 0,
    'xcode-ninja': 0,
  }[test.format]

  test.build('test.gyp', 'no_cpp_dep_on_cc_lib', chdir=CHDIR,
             status=build_error_code)

  test.pass_test()

VaKeR 2022