The link order depends on the order of library definitions and dependencies in the Project.meta files.
In general, if a library X depends on a library Y, the library X must be linked before Y.
Project A:
Dependency B
Dependency C
Project B:
Dependency D
Project C:
Dependency D
Project D:
The link order will be
Project A:
ExternalLibrary a1
Dependency B
ExternalLibrary a2
Dependency C
ExternalLibrary a3
Project B:
ExternalLibrary b1
Dependency D
ExternalLibrary b2
Project C:
ExternalLibrary c1
Dependency D
ExternalLibrary c2
Project D:
ExternalLibrary d1
ExternalLibrary d2
The link order will be