Repository: nodejs/node
File: configure.py (Python)

Code before:
      error('''Did not find a new enough assembler, install one or build with
       --openssl-no-asm.
       Please refer to BUILDING.md''')

  elif options.openssl_no_asm:
    warn('''--openssl-no-asm will result in binaries that do not take advantage
         of modern CPU cryptographic instructions and will therefore be slower.
         Please refer to BUILDING.md''')

  if options.openssl_no_asm and options.shared_openssl:
    error('--openssl-no-asm is incompatible with --shared-openssl')

  if options.openssl_is_fips:
    o['defines'] += ['OPENSSL_FIPS']

  if options.openssl_is_fips and not options.shared_openssl:
    variables['node_fipsinstall'] = b(True)

  configure_library('openssl', o)

  o['variables']['openssl_version'] = get_openssl_version(o)

def configure_lief(o):
  if options.without_lief:
    if options.shared_lief:
      error(f'--without-lief is incompatible with --shared-lief')
    return

  configure_library('lief', o, pkgname='LIEF')

def configure_sqlite(o):
  o['variables']['node_use_sqlite'] = b(not options.without_sqlite)
  if options.without_sqlite:
    def without_sqlite_error(option):
      error(f'--without-sqlite is incompatible with {option}')
    if options.shared_sqlite:
      without_sqlite_error('--shared-sqlite')
    return

  configure_library('sqlite', o, pkgname='sqlite3')

def configure_quic(o):
  o['variables']['node_use_quic'] = b(options.experimental_quic and
                                      not options.without_ssl)

def configure_static(o):
  if options.fully_static or options.partly_static:
    if flavor == 'mac':
      warn("Generation of static executable will not work on macOS "
            "when using the default compilation environment")
      return

Review comment (suggestion):
```suggestion
      error('--without-lief is incompatible with --shared-lief')
```

Code after:
  variables['node_without_node_options'] = b(options.without_node_options)
  if options.without_node_options:
      o['defines'] += ['NODE_WITHOUT_NODE_OPTIONS']
  if options.openssl_default_cipher_list:
    variables['openssl_default_cipher_list'] = \
            options.openssl_default_cipher_list

  if not options.shared_openssl and not options.openssl_no_asm:
    is_x86 = 'x64' in variables['target_arch'] or 'ia32' in variables['target_arch']

    # supported asm compiler for AVX2. See https://github.com/openssl/openssl/
    # blob/OpenSSL_1_1_0-stable/crypto/modes/asm/aesni-gcm-x86_64.pl#L52-L69
    openssl110_asm_supported = \
      ('gas_version' in variables and Version(variables['gas_version']) >= Version('2.23')) or \
      ('xcode_version' in variables and Version(variables['xcode_version']) >= Version('5.0')) or \
      ('llvm_version' in variables and Version(variables['llvm_version']) >= Version('3.3')) or \
      ('nasm_version' in variables and Version(variables['nasm_version']) >= Version('2.10'))

    if is_x86 and not openssl110_asm_supported:
      error('''Did not find a new enough assembler, install one or build with
       --openssl-no-asm.
       Please refer to BUILDING.md''')

  elif options.openssl_no_asm:
    warn('''--openssl-no-asm will result in binaries that do not take advantage
         of modern CPU cryptographic instructions and will therefore be slower.
         Please refer to BUILDING.md''')

  if options.openssl_no_asm and options.shared_openssl:
    error('--openssl-no-asm is incompatible with --shared-openssl')

  if options.openssl_is_fips:
    o['defines'] += ['OPENSSL_FIPS']

  if options.openssl_is_fips and not options.shared_openssl:
    variables['node_fipsinstall'] = b(True)

  configure_library('openssl', o)

  o['variables']['openssl_version'] = get_openssl_version(o)

def configure_lief(o):
  if options.without_lief:
    if options.shared_lief:
      error('--without-lief is incompatible with --shared-lief')
    return

  configure_library('lief', o, pkgname='LIEF')

def configure_sqlite(o):
  o['variables']['node_use_sqlite'] = b(not options.without_sqlite)