Where to find the compiling scripts or the detailed build configurations used by PyTorch

Hello,

I am planning to compile PyTorch from source and aim to replicate the official PyTorch builds as closely as possible. To achieve this, I would like to use the exact compile options and flags that are used for the official releases.

Could anyone please direct me to where I can find the compiling scripts or the detailed build configurations used by PyTorch?

Thank you for your assistance.