---
title: 'LibraryToLink'
---

A library the user can link against.

## Members

* [alwayslink](#alwayslink)
* [dynamic_library](#dynamic_library)
* [interface_library](#interface_library)
* [lto_bitcode_files](#lto_bitcode_files)
* [objects](#objects)
* [pic_lto_bitcode_files](#pic_lto_bitcode_files)
* [pic_objects](#pic_objects)
* [pic_static_library](#pic_static_library)
* [resolved_symlink_dynamic_library](#resolved_symlink_dynamic_library)
* [resolved_symlink_interface_library](#resolved_symlink_interface_library)
* [static_library](#static_library)

## alwayslink

```
bool LibraryToLink.alwayslink
```

Whether to link the static library/objects in the --whole_archive block.

## dynamic_library

```
File LibraryToLink.dynamic_library
```

`Artifact` of dynamic library to be linked. Always used for runtime and used for linking if `interface_library` is not passed.
May return `None`.

## interface_library

```
File LibraryToLink.interface_library
```

`Artifact` of interface library to be linked.
May return `None`.

## lto_bitcode_files

```
sequence LibraryToLink.lto_bitcode_files
```

`List` of LTO bitcode files in the library.
May return `None`.

## objects

```
sequence LibraryToLink.objects
```

`List` of object files in the library.
May return `None`.

## pic_lto_bitcode_files

```
sequence LibraryToLink.pic_lto_bitcode_files
```

`List` of pic LTO bitcode files in the library.
May return `None`.

## pic_objects

```
sequence LibraryToLink.pic_objects
```

`List` of pic object files in the library.
May return `None`.

## pic_static_library

```
File LibraryToLink.pic_static_library
```

`Artifact` of pic static library to be linked.
May return `None`.

## resolved_symlink_dynamic_library

```
File LibraryToLink.resolved_symlink_dynamic_library
```

The resolved `Artifact` of the dynamic library to be linked if `dynamic_library` is a symlink, otherwise this is None.
May return `None`.

## resolved_symlink_interface_library

```
File LibraryToLink.resolved_symlink_interface_library
```

The resolved `Artifact` of the interface library to be linked if `interface_library` is a symlink, otherwise this is None.
May return `None`.

## static_library

```
File LibraryToLink.static_library
```

`Artifact` of static library to be linked.
May return `None`.