Method: Rscons::Builders::SharedLibrary#setup

Defined in:
lib/rscons/builders/shared_library.rb

#setup(options) ⇒ Object

Set up a build operation using this builder.

Parameters:

  • options (Hash)

    Builder setup options.

Returns:

  • (Object)

    Any object that the builder author wishes to be saved and passed back in to the #run method.



67
68
69
70
71
72
73
# File 'lib/rscons/builders/shared_library.rb', line 67

def setup(options)
  target, sources, env, vars = options.values_at(:target, :sources, :env, :vars)
  suffixes = env.expand_varref(["${OBJSUFFIX}", "${LIBSUFFIX}"], vars)
  # Register builders to build each source to an object file or library.
  env.register_builds(target, sources, suffixes, vars,
                      features: %w[shared])
end