# tf.sysconfig.get_compile_flags

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/platform/sysconfig.py#L56-L88) |

Returns the compilation flags for compiling with TensorFlow.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.sysconfig.get_compile_flags`](https://www.tensorflow.org/api_docs/python/tf/sysconfig/get_compile_flags)

<br />

    tf.sysconfig.get_compile_flags()

The returned list of arguments can be passed to the compiler for compiling
against TensorFlow headers. The result is platform dependent.

For example, on a typical Linux system with Python 3.7 the following command
prints `['-I/usr/local/lib/python3.7/dist-packages/tensorflow/include',
'-D_GLIBCXX_USE_CXX11_ABI=1', '-DEIGEN_MAX_ALIGN_BYTES=64']`

    print(tf.sysconfig.get_compile_flags())

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A list of strings for the compiler flags. ||

<br />